Learn Geek languages like Big data,Hadoop,Hive,Pig,Sqoop ,flume,Cassandra,Hbase,Ruby On Rails,Python,Java and many more.

Monday 4 July 2016

Rails Helper Tags

TAGS:

ERB tags                   <%    %>
print ERB tags          <%=  %>
print ERB comment  <%# %>
if block                      <% if %>...<% end %>
if / else                       <% if %>...<% else %>...<% end %>
else tag     else           <% else %>
elsif tag     elsif          <% elsif %>
end block     end        <% end %>
link_to helper             <%= link_to ..., ... %>
form_for helper     form      <%= form_for(@) do %>

Helpers:

   Form Component     Output Code Snippet

   f.submit                       <%= f.submit "Submit"  %>
   f.password_field          <%= f.password_field :attribute %>
   f.text_area                   <%= f.text_area :attribute %>
   f.check_box                 <%= f.check_box :attribute %>
   f.label                          <%= f.label :attribute, "Attribute" %>
   f.text_field                   <%= f.text_field :attribute %>
   f.file_field                    <%= f.file_field :attribute %>
   f.hidden_field              <%= f.hidden_field :attribute %>

1 comment:

if you have any query regarding geek languages,
email on arora.ratul@gmail.com