[SOLVED] I re-read the error message, and it''s so obvious : The
action> ''{:change_area=>{:area=>20}}''
I wrote a ''=>" in place of a comma ....
but it''s Sunday ... I should clue my computer and go to the beach ...
On May 13, 5:20 pm, Erwin <yves_duf...-ee4meeAH724@public.gmane.org>
wrote:> I have a route defined as :
>
> change_area_backoffice_regions GET /backoffice/regions/
> change_area(.:format) backoffice/regions#change_area
>
> I am testing using the following functional test :
>
> test "should list regions in another area" do
> south_west = FactoryGirl.create(:area, name: "South West)
> new_mexico = FactoryGirl.create(:region, area: south_west, code:
> "72")
> # here is my call
> xhr :get, :change_area => { :area => south_west[:id]}
> # sending the area[:id] as a parameter
> assert_select "a", {:count => 1, :text => "New
Mexico"}, "Wrong
> name or more than one region element"
> end
>
> but I get a route error :
> AbstractController::ActionNotFound: The action
> ''{:change_area=>{:area=>20}}'' could not be found
for
> Backoffice::RegionsController
> this action is defined , and the route is there , what''s wrong
with y
> test code ?
>
> def change_area
> @area = Area.find(params[:area])
> @regions = @area.regions
> render "backoffice/regions/change_area.js"
> end
>
> thanks for any feedback
--
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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.