Softpedia
 


SCRIPTS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Peardrop CMS 0.2.3
  • CommaFeed 0.0.1
  • Squash
  • Pick-a-Color 1.1.5
  • MVIS Security Center 1....
  • EasyZoom 1.0.3
  • jQueryGantt
  • IMDBPHP 2.1.8
  • Dynamic WordPress Form ...
  • PathFinding.js 0.4.1
  • Home > Scripts > Snippets

    Save and render helper for in_place_editor method

    download button


    Downloads: 483  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.3/5)
    19 user(s)
    Developer:

    Website:

    License / Price:

    Platforms:

    Databases:

    Language:

    Last Updated:

    Category:
    zerohalo | More scripts
    snippets.dzone.com
    Freeware 

    Windows / Linux
    N/A
    Ruby
    June 27th, 2007, 10:11 GMT
    C: \ Snippets

     Read user reviews (0)  Refer to a friend  Subscribe

    Save and render helper for in_place_editor method description

    Save and render helper for in_place_editor method automatically calls a controller named set_table_field.

    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.



    TAGS:

    render helper | editor method | ruby snippets | render | helper | editor

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM