[Rails] Re: Delete action is not working and redirects to edit action
On Nov 4, 4:23 am, "Kostas L." <loup...@gmail.com> wrote:
> Hello,
> i have a strange problem here. I have made a teacher controller using
> scaffold. All actions work fine but the delete does not. When i click
> the delete link, it redirects me to the edit of this teacher. I have
> restarted the server and i have tried in firefox (i use chrome) but
> problem still remains. Here is the code from my view.
>
I had this same problem when starting a new Rails 3 project with
jQuery. (I generated this project using a template from the Rails
Wizard website.)
If you are using jQuery, make sure you have the correct rails.js file
(the jquery-rails gem will add rake tasks to help manage this).
Also make sure that the jquery.min file is being loaded with the
rails.js file
My layout was using "javascript_include_tag :defaults", but only my
rails.js file was getting loading.
I fixed this by updating the config/application.rb file and modifying
the "config.action_view.javascript_expansions[:defaults]" setting to
add jquery.min.
--
Eric
--
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@googlegroups.com.
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home