Can't delete a post
melissawahnish opened this issue · 5 comments
Hi! Thanks so much for creating this great blog gem. I've added Blogo as a gem on a current project and found one error. When I try to delete a post, I get the following error:
ActiveRecord::RecordNotFound at /blog/admin/posts/lala-okay
Couldn't find Blogo::Post with 'id'=lala-okay
With "lala-okay" being the permalink. The request params were as follows:
{"_method"=>"delete", >"authenticity_token"=>"raViARcc4taC8COLF771reAhbK3vvEvggh+t9X84ZKd9Rva8BAZNuSqEg6tC>5OjCpCegbGlyHw7DrVY2SD15wg==", "controller"=>"blogo/admin/posts", "action"=>"destroy", >"id"=>"lala-okay"}
For some reason, the permalink is being used as the id, and the destroy method can't find a record by the permalink.
Please let me know if you need any further information.
Sincerely,
Melissa
@melissawahnish Hi!
Thanks for giving Blogo a try. I am sorry for delay, currently I am over busy (I am relocating to another country).
I am able to reproduce the error.
Looks like I am searching for post by id passing it permalink
https://github.com/greyblake/blogo/blob/master/app/controllers/blogo/admin/posts_controller.rb#L55-L56
I'll fix it in few days! Thanks for the bug report!
Great thanks!
@melissawahnish I just released version `0.1.0. with the fix.
Thanks! Will check it out soon!
On Sat, Mar 28, 2015 at 8:36 PM, Sergey Potapov notifications@github.com
wrote:
@melissawahnish https://github.com/melissawahnish I just released
version `0.1.0. with the fix.—
Reply to this email directly or view it on GitHub
#15 (comment).
Melissa Wahnish
Aarting
www.aarting.com
646-400-2777