inplace_edit with rails 2.0

31 views
Skip to first unread message

mike84290

unread,
Jan 10, 2008, 5:15:50 PM1/10/08
to ActiveScaffold : Ruby on Rails plugin

Does anybody out there know the steps needed to get

active_scaffold :addresses do |config|
config.columns[:city].inplace_edit = true
end

to work w/ rails 2.0?
I have the trunk version of AS installed....

it seems that in_place_editor got moved out of rails 2.0, hence
getting an error like:
undefined method `in_place_editor' for #<ActionView::Base:0x23d8630>
makes sense...

so I did a little research (not enough though)
and I installed
script/plugin install http://svn.redlinesoftware.com/plugins/in_place_editor
and I still got this error
undefined method `in_place_editor' for #<ActionView::Base:0x23d8630>
but I think thats because that plugin still requires in_place_editor

then I installed
script/plugin install http://svn.rubyonrails.org/rails/plugins/in_place_editing
and got the same error...

it seems that everything I read says you only have to add one line to
the controller and one line to the view, it is my understanding that
with AS the .inplace_edit = true accomplishes that...
is something else required???

thanks in advance for any help at all....

Sergio Cambra

unread,
Jan 10, 2008, 6:48:11 PM1/10/08
to actives...@googlegroups.com
El Jueves, 10 de Enero de 2008, mike84290 escribió:
> Does anybody out there know the steps needed to get
>
> active_scaffold :addresses do |config|
> config.columns[:city].inplace_edit = true
> end
>
> to work w/ rails 2.0?
> I have the trunk version of AS installed....

I have using it with rails 2.0.2 and trunk AS

>
> it seems that in_place_editor got moved out of rails 2.0, hence
> getting an error like:
> undefined method `in_place_editor' for #<ActionView::Base:0x23d8630>
> makes sense...

In rails 2.x it's in in_place_editing plugin.

> then I installed
> script/plugin install
> http://svn.rubyonrails.org/rails/plugins/in_place_editing and got the
> same error...

Did you restart the web server? Maybe it's needed.

>
> it seems that everything I read says you only have to add one line to
> the controller and one line to the view, it is my understanding that
> with AS the .inplace_edit = true accomplishes that...
> is something else required???

I think I didn't need to do anymore, although to use with
protect_from_forgery you need apply a patch. You can find it in ticket
#10055 of rails trac:
http://dev.rubyonrails.org/ticket/10055

JeffS

unread,
Jan 11, 2008, 9:30:46 AM1/11/08
to ActiveScaffold : Ruby on Rails plugin
I am having the same problem with inplace_edit not working, and I'm
getting a similar error message.

Since I moved my app over from a Windows box to a Linux box at the
same time I upgraded Rails to 2.0.2, I thought maybe I had configured
something incorrectly. However, everything else in my app is now
working, so I'm not sure what is going on.

I finally just commented out my inplace_edit calls, and the failing
scaffold started working again (albeit without inplace edits!)

I am running AS 1.1RC1.

Jeff

Sean Schofield

unread,
Jan 14, 2008, 1:54:19 PM1/14/08
to ActiveScaffold : Ruby on Rails plugin
I think this is your problem.

http://dev.rubyonrails.org/ticket/10055

Rafael G.

unread,
Jan 15, 2008, 1:42:32 PM1/15/08
to actives...@googlegroups.com
A simple solution is don't protect this action from forgery. For example
in your controller put:

protect_from_forgery :except => [:autocomplete_foo]

Regards!

Sean Schofield escribió:


--
Rafael Garcia Ortega

rgo.vcf

talknightlife

unread,
Jan 16, 2008, 5:14:28 PM1/16/08
to ActiveScaffold : Ruby on Rails plugin
Messages that I post to this group do not appear in the group's
"Discussions" index, even though they're visible by searching for
them. This message is a test to see whether I can reply to an
existing discussion. And that's about all that I've got to contribute
to this thread.

JeffS

unread,
Jan 16, 2008, 10:21:03 PM1/16/08
to ActiveScaffold : Ruby on Rails plugin
Thanks guys.

Interestingly enough, inplace edit is working now. I must have fixed
something inadvertently.

Now I have noticed a new problem- before_update_save doesn't seem to
trigger when using inplace edit on subforms. I'm going to do some
forum searching on that now.

Jeff

JeffS

unread,
Jan 16, 2008, 10:23:45 PM1/16/08
to ActiveScaffold : Ruby on Rails plugin
Ah. I forgot that I rolled back to Rails 1.2.6 the other day. That's
why inplace edit is working now :)

JeffS

unread,
Jan 21, 2008, 4:16:17 PM1/21/08
to ActiveScaffold : Ruby on Rails plugin
I have seen the same problem since 14 January. Very odd! The group
seems to have stopped indexing/updating.
Reply all
Reply to author
Forward
0 new messages