Permalink
Browse files

Changed eruby-rails snippets for work correctly in Rails 3

  • Loading branch information...
rafaelfranca committed Apr 9, 2010
1 parent b3b629d commit a83b5873efc3a5088173df2b69fcd8cb22c9f0c9
View
@@ -1,3 +1,3 @@
-<% content_for :${1:yield_label_in_layout} do -%>
+<% content_for :${1:yield_label_in_layout} do %>
${2}
-<% end -%>
+<% end %>
View
@@ -1 +1 @@
-<%= content_tag '${1:DIV}', ${2:content}${3:, options} -%>
+<%= content_tag '${1:DIV}', ${2:content}${3:, options} %>
View
@@ -1,3 +1,3 @@
-<% form_for @${1:model} do |f| -%>
+<%= form_for @${1:model} do |f| %>
${2}
-<% end -%>
+<% end %>
View
@@ -1,5 +1,4 @@
-<% error_messages_for :${1:model} -%>
-
-<% form_for @${2:model} do |f| -%>
+<%= form_for @${2:model} do |f| %>
+ <%= f.error_messages %>
${3}
-<% end -%>
+<% end %>
@@ -1,3 +1,3 @@
-<% fields_for :${1:model}, @$1 do |${2:f}| -%>
+<% fields_for :${1:model}, @$1 do |${2:f}| %>
${3}
-<% end -%>
+<% end %>
View
@@ -1,3 +1,3 @@
-<% for ${2:item} in ${1:list} -%>
+<% for ${2:item} in ${1:list} %>
${3}
-<% end -%>
+<% end %>
View
@@ -1,3 +1,3 @@
-<% form_tag(${1:'url'}) do -%>
+<%= form_tag(${1:'url'}) do %>
${2}
-<% end -%>
+<% end %>
View
@@ -1 +1 @@
-<%= javascript_include_tag <+:all+><+, :cache => <+true+>+> %>
+<%= javascript_include_tag ${1::all}, :cache => ${2:true} %>
@@ -1 +1 @@
-<%= link_to "${1:link text}", :controller => "${2:items}", :action => "${3:edit}", :id => <+@<+item+>+> %>
+<%= link_to "${1:link text}", :controller => "${2:items}", :action => "${3:edit}", :id => @${4:item} %>
View
@@ -1 +1 @@
-<%= link_to <+"<+link text+>"+>, <+<+parent+>_<+child+>_path(<+@+><+parent+>, <+@+><+child+>)+> %>
+<%= link_to "${1:link text}", ${2:parent}_${3:child}_path(@$2, @$3) %>
@@ -1 +1 @@
-<%= link_to <+"<+link text+>"+>, <+<+parent+>_<+child+>_path(<+@+><+parent+>)+> %>
+<%= link_to "${1:link text}", ${2:parent}_${3:child}_path(@$2) %>
View
@@ -1 +1 @@
-<%= link_to <+"<+link text+>"+>, <+<+model+>_path(<+@+><+instance+>)+> %>
+<%= link_to "${1:link text}", ${2:model}_path(@${3:instance}) %>
View
@@ -1 +1 @@
-<%= link_to <+"<+link text+>"+>, <+<+model+>s_path+> %>
+<%= link_to "${1:link text}", ${2:model}s_path %>
@@ -1 +1 @@
-<%= options_from_collection_for_select ${1:collection}, ${2:value_method}, ${3:text_method}<+, <+[selected_value]+>+> %>
+<%= options_from_collection_for_select ${1:collection}, ${2:value_method}, ${3:text_method}, ${4:selected_value} %>
View
@@ -1 +1 @@
-<%= stylesheet_link_tag ${1::all}<+, :cache => <+true+>+> %>
+<%= stylesheet_link_tag ${1::all}, :cache => ${2:true} %>
View
@@ -1 +1 @@
-<%= submit_tag "${1:Save changes}"<+, :id => "<+submit+>"+><+, :name => "<+submit+>"+><+, :class => "<+form_name+>"+><+, :disabled => <+false+>+><+, :disable_with => "<+Please wait+>"+> %>
+<%= submit_tag "${1:Save changes}" %>

0 comments on commit a83b587

Please sign in to comment.