search for: in_place_edit_for

Displaying 16 results from an estimated 16 matches for "in_place_edit_for".

2007 Dec 11
2
in_place_edit_for into which plugin?
The docs state that in_place_edit_for has been moved into a plugin for Rails 2.0: Module ActionController::Macros::InPlaceEditing::ClassMethods "DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships." and the error messages seem to bear this out: "undefined method `in_place_edit_for'&...
2005 Nov 16
0
in_place_edit_for, multiple attributes?
I am using some in place editors on a page that views and updates records. I have it working but want to know if there is a more efficient way of declaring them in the controller. Currently, I have the following: class ChurchesController < ApplicationController in_place_edit_for :church, :name in_place_edit_for :church, :address # etc, etc... Is there a way to do this all on one line, like: in_place_edit_for :church, { :name, :address } Tried that to no avail. Thoughts? -- Posted via http://www.ruby-forum.com/.
2006 Jan 18
5
Perform action after in-place edit
I want to be able to call an action after performing an edit using the in-place editor macro. I want to update multiple divs so I was thinking about using an RJS template. However, I can''t figure out how to trigger another action after the method created by in_place_edit_for runs. Is there is an option on Ajax.InPlaceEditor where I can inject some Element.update calls? Thanks, Shane
2006 Mar 31
13
validation with in_place_edit_for
i''ve got an in place edit text box for some of my fields. my model has validates_presence_of for the field but nothing happens. it works fine in the scaffold when using the edit page, but nowhere else. anyone have a solution to this? -- Posted via http://www.ruby-forum.com/.
2006 Apr 03
4
Edit in Place in 1.1
Does anyone have a good example or know of some documentation about how to implement "Edit in Place" using Rails 1.1? Like the functionality in Flickr... I''ve googled and googled and can''t find any good documentation. Maybe it''s because 1.1 is so new? Thanks in advance. -Andy
2006 Jan 13
0
Controller part of in-place editing
...id.to_s) %> <td><%= link_to ''Destroy'', { :action => ''destroy'', :id => link }, :confirm => ''Are you sure?'' %></td> </tr> <% end %> ### However, after reading the docs on the in_place_editor and in_place_edit_for controller macro, I''m pretty stumped as to what I need to put into my controller to actually get the editing going. Should it be the in_place_edit_for? Should I be using in_place_editor_field instead of in_place_editor? Does anyone have a working example I could use, or have any advi...
2006 Apr 04
3
How to use in_place_editor_field ?
Hello, I really don''t understand how to use in_place_editor_field In my controller : class Admin::CategoriesController < Admin::BaseController in_place_edit_for :category, :title def list @categories = Category.find_all end end In the view list.rhtml <% @categories.each do |c| %> <td><%= in_place_editor_field :c, c.title %></td> # snip <% end %> I get error Called id for nil, which would mistakenly be 4 -- if y...
2007 Dec 21
1
in_place_editor not working for Internationalization
...Globalize example (http://wiki.globalize- rails.org/globalize/show/Example+Application), using in_place_editor. The translation works fine, however, I can''t get in_place_editor to work to translate the strings. My controller: class Admin::TranslateController < ApplicationController in_place_edit_for :translation, :text def index @view_translations = ViewTranslation.find(:all, :conditions => [ ''built_in IS NULL AND language_id = ?'', Locale.language.id ], :order => ''text'') end def translation_text @translation = ViewTranslation.find(param...
2008 Feb 22
7
undefined local variable or method "acts_as_list"?
...ase.rb:1532:in `method_missing'' app/models/toner_special.rb:4 app/controllers/specials_controller.rb:6 Here''s the code that''s causing the problem from the app/controllers/ specials_controller.rb file: TonerSpecial.content_columns.each do |column| # line 6 in_place_edit_for :toner_special, column.name end Any insights are greatly appreciated, - Dave --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-ta...
2006 Jul 06
0
Using in_place_editor_field for collections?
...referencing a nil, so I did this: <%= in_place_editor_field ''question[]'', :name %> adding the [] seemed to fix things. Now all the fields show up on the page and they are all clickable. But I am having trouble getting the controller to update the fields. Using plain in_place_edit_for :question, :name hasn''t done the trick. I have tried looking at the api, but it didn''t even cover using the [] for collections. Any ideas? -- Posted via http://www.ruby-forum.com/.
2006 Apr 18
4
IN-PLACE FORM EDITING
Ive been following the rails recipes (great book) and wanted to have a larger a text field when editing in place. The chapter it mentions that I can "force the InPlaceEditor to create either a text ?eld or a <textarea> ?eld, using the :rows option to in_place_editor_?eld( ). Then any value greater than 1 will tell InPlaceEditor to generate a <textarea>." It
2006 Apr 24
3
Rails Recipes Book: Routing Error
Hi, I''m working on the first rails recipe, InPlaceEditing, and following the instructions very carefully. After generating the scaffold for Contact, I then go to the page, thus: http://localhost:3000/contacts/ I get this error: Routing Error Recognition failed for "/contacts/" What should I be checking for to resolve this problem? Thanks. -- Posted via
2005 Nov 14
0
in_place_editor_field inside a partial collection
...anybody succeeded in using "in_place_editor_field" inside a partial collection? It''s working perfectly in a regular template, but the id part becomes blank when it''s inside a partial collection. article_controller.rb: class ArticleController < ApplicationController in_place_edit_for :comment, :body ... end _comment.rhtml: <li id="comment-<%= comment.id %>"> <%= in_place_editor_field :comment, :body %> </li> show.rhtml: .... <ol id="comments"> <% unless @article.comments == nil %> <%= render :partial => "comme...
2008 Jun 06
0
in_place_editor_field in Rails 2.0.2
...<%= in_place_editor_field(:profile, :first_name) %> <% end %> <% end %> profiles_controller.rb def index @profiles = Profile.find(:all) respond_to do |format| format.html end end At one point I read something about including the following line in the controller: in_place_edit_for :profile, :first_name However, that line doesn''t do much as far as I can tell. When I go to my view, I see the text (the first name), but I cannot edit it there. I''m a bit confused as to how this is supposed to work. Any help is appreciated! --~--~---------~--~----~------------...
2006 Jan 19
5
script.aculos.us and the in_place_editor
...-%>"> <%= @profile.age %> <%= in_place_editor(''@profile.age'' + @profile.id.to_s, :url => {:action => ''ajax_update''}, )%> </span> </div> </p> At the top of my profile controller I placed the following: in_place_edit_for :profile, :age This is where I have a question. How do would I actually go about saving the new value that was inputted into the text box that popped up? I have the following in the ''ajax_update'' action. This obviously doesn''t work! def ajax_update @profile = par...
2006 Mar 18
1
Need help .. Rails Recipes, in_place_editor, selecting associations
Hi, I am currently reading the Rails Recipes book and like the chapter on providing your own in_place_editor for enumerations / selects. I understood so far, or I believe that I understood ;-), how to do that for a field that uses values only, like choosing from "red", "black", "green". What I fail to understand is how to chose from associated objects?!