Last active
August 29, 2015 13:56
-
-
Save jlebrech/8863055 to your computer and use it in GitHub Desktop.
Revisions
-
jlebrech revised this gist
Feb 7, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ def update @my_form = MyForm.new(params) if @my_form.valid? @mc_guffin.update_parameters(@my_form.to_hash) else flash.now @my_form.errors end -
jlebrech revised this gist
Feb 7, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ def edit def update @my_form = MyForm.new(params) if @my_form.valid? McGuffin.create(@my_form.to_hash) else flash.now @my_form.errors -
jlebrech revised this gist
Feb 7, 2014 . 3 changed files with 18 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ <% @my_form.render do |f| # custom form %> <div class="firstname"><%= f.firstname # maybe options are possible here %></div> <div class="text"><%= f.text %></div> <% end %> <%= @my_form.render # no customization %> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,11 @@ Class MyForm < RealForm text_area :text, size: 100, label: "Some text", class: "funky class", validate: is_blah_blah input :firstname password :password, id: "the password" def is_blah_blah ... end end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,13 @@ def edit @my_form = MyForm.new() end def update @my_form = MyForm.new(params) if @my_form.valid McGuffin.create(@my_form.to_hash) else flash.now @my_form.errors end end -
jlebrech created this gist
Feb 7, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ <% @my_form do |f| # custom form %> <div class="firstname"><%= f.firstname # maybe options are possible here %></div> <div class="text"><%= f.text %></div> <% end %> <%= @my_form # no customization %> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ Class MyForm < RealForm text_area :text, size: 100 input :firstname password :password end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ def edit @my_form = MyForm.new() end