Save and render helper for in_place_editor method

Category: Other - Tools & Utilities

in_place_editor automatically calls a controller named set_table_field. You can create one automatically with teh in_place_edit_for but only if ey want to display the actual text typed. That doesn't work for drop-down boxes or in cases where you want to update other elements based on the field changed. For that you create the method yourself, and rely on the params[:id] and params[:value] to find the correct record, update the attribute, save and return the value to be displayed via ajax. If you have a lot of them in your site, you end up with a lot of code duplication. This helper fixes that. Date: 17 January, 2012


Render Helper - Editor Method - Ruby Snippets - Render - Helper - Editor

Homepage: http://snippets.dzone.com

Developer: snippets.dzone.com

License: Freeware

Operating System: Windows, Linux

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

Split an array of elements into a set of smaller arrays of equal size.

developer Developer: snippets.dzone.com
license License: Freeware
operating systems Operating System: All


Split a string into an array of roughly equal sized chunks based on a string or regular expression delimiter.

developer Developer: snippets.dzone.com
license License: Freeware
operating systems Operating System: All


Get the currently running method name in Ruby - how to get the running methos name in ruby.

developer Developer: snippets.dzone.com
license License: Freeware
operating systems Operating System: All


Float Hacks:to_s override.

developer Developer: snippets.dzone.com
license License: Freeware
operating systems Operating System: All


A replacement for Ruby's File.

developer Developer: snippets.dzone.com
license License: Freeware
operating systems Operating System: All


The following code will create a live search in your Ruby on Rails project using AJAX.

developer Developer: snippets.dzone.com
license License: Freeware
operating systems Operating System: All


Clone dev DB schema to test DB in Rails.

developer Developer: snipplr.com
license License: Freeware
operating systems Operating System: All


Iterate through each child association of a active record class.

developer Developer: snippets.dzone.com
license License: Freeware
operating systems Operating System: Windows, Linux


The in_place_select_editor method assumes that you want to display the exact item being edited.

developer Developer: snippets.dzone.com
license License: Freeware
operating systems Operating System: Windows, Linux