Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding a child page without a default translation cannot be edited in the backend #2209

Closed
jess opened this issue Mar 7, 2013 · 1 comment
Labels

Comments

@jess
Copy link
Contributor

jess commented Mar 7, 2013

here's a failing test: b446ee9

I fails because @page is nil. The find_by_path_or_id method returns nil because the path is parent-page/5 instead of just the id or slug, ie 5

   69: def find_page
=> 70:   binding.pry
   71:   @page = Refinery::Page.find_by_path_or_id(params[:path], params[:id])
   72: end

[1] pry(#<Refinery::Admin::PagesController>)> params
=> {"switch_locale"=>"ru",
 "controller"=>"refinery/admin/pages",
 "action"=>"edit",
 "path"=>"parent-page/5",
 "locale"=>:en}

[2] pry(#<Refinery::Admin::PagesController>)>          Refinery::Page.find_by_path_or_id(params[:path], params[:id])

=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants