Ruby on Rails Saturday, June 1, 2013

Have you a route to a corresponding controller in general? Have you a controller? Does this controller work when you try to deliver an HTML view?
Oh, and when you want to have a js response, then you must use /test/index.js, without the extension given rails will try to deliver HTML (if you haven't configured it to do something else). Do you get an error message in server logs or browser when you try to access your ressource? Which one?

Answer this questions as exactly as possible or we can't help.

Am 01.06.2013 11:52 schrieb "Paul Bergstrom" <lists@ruby-forum.com>:
Colin Law wrote in post #1110879:
> On 1 June 2013 09:00, Paul Bergstrom <lists@ruby-forum.com> wrote:
>>
>> Not sure how I can explain it better. It's a very simple example.
>>
>> When going with the browser to an action with a corresponding *.js.erb
>> file should the JavaScript in that file run, like alert("hello")? Or is
>> that old rjs?
>
> Look in development.log to see what is happening.  Look at the source
> in the browser to see what is being sent to the browser.
>
> Colin

Doesn't seem to load. This should be so incredible simple. Why doesn't
it work? What have I missed?

Should this very very basic example of UJS work? Do I need to add
something with format.js {}? In routes?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a2c95ed366bac8f9391bc4ba7e99b687%40ruby-forum.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2BbCVss%2BEQ8Kb-Pn9QjHXf8H9LBzvfT2U36J9G9OdMtu-F6tmA%40mail.gmail.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment