[Rails] Re: Disable back button of browser
Rafi A wrote: >Ashok, > >You can disable the browser back button with the help >of JavaScript snippets: I don't think so. This is in the FAQ in comp.lang.javascript, and the answer is that it can't be done. -- Tim Slattery slatter...@bls.gov -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Email with out SMTP Settings is it possible
KUL KING wrote: >So I was right that we have to use SMTP to send email. Whether it is from >localhost or gmail. Am I right? SMTP = Simple Mail Transfer Protocol. That's the language you use to talk to another computer to send mail. Usually, you talk to a server whose job is to take mail from you and send it on to its destination. If it can't contact the destination machine the first time it tries, it will wait a while and try again. It won't give up until a few iterations of this. You can bypass that and have your program directly contact the destination machine. In that case, you have to parse the address to get the domain name, look up the MX record in the DNS for that domain (not the normal A record), then establish contact with the remote machine, etc. Using an SMTP relay server is much simpler. -- Tim Slattery slatter...@bls.gov -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: rails s
Nailson Martins wrote: >Probably you are running the command in the wrong location, to do any >command, you must do at the location of your Rails app. And when you do, only a few lines appear on the screen. You then aim your browser at http://localhost:3000, and your app should appear. -- Tim Slattery slatter...@bls.gov -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: "Undefined method"
Colin Law wrote: >It was not that in the first place, according to your post it was ><%= form_for @jolts_registry do |f| %> ah..Right. I tried a good many things, kept getting the exact same error until putting the "action" phrase in. yes I looked at the routing doc. Didn't see anything to help. Still don't get it. -- Tim Slattery slatter...@bls.gov -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: "Undefined method"
Tim Slattery wrote: >Colin Law wrote: > > >>> Don't understand, which route? >> >>You are trying to create a form for a JoltRegistry, that expects to >>submit to a jolts_registries_path (as in the error message). The >>normal way to generate the route would be to use >>resources :jolts_registries > >I've done that. Same message. I've tried several different >permutations of methods, etc. Always the exact same message. I have no >clue in the world what in the hell it wants me to do. I have no clue >where it gets "jolts_registries" from in the first place. Changing the form tag from <%= form_for @registry do |f| %> to <%= form_for @registry, :url => { :action => "create" } do |f| %> fixed it. -- Tim Slattery slatter...@bls.gov -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: "Undefined method"
Colin Law wrote: >> Don't understand, which route? > >You are trying to create a form for a JoltRegistry, that expects to >submit to a jolts_registries_path (as in the error message). The >normal way to generate the route would be to use >resources :jolts_registries I've done that. Same message. I've tried several different permutations of methods, etc. Always the exact same message. I have no clue in the world what in the hell it wants me to do. I have no clue where it gets "jolts_registries" from in the first place. -- Tim Slattery slatter...@bls.gov -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: "Undefined method"
Colin Law wrote: >On 21 August 2012 21:12, Tim Slattery wrote: >> I have a controller named RegistriesController. It contains a single >> method: >> >> def edit >>@jolts_registry = JoltsRegistry.new >> end >> >> This runs, and the associated view is invoked. That stops on line 9: >> >> <%= form_for @jolts_registry do |f| %> >> >> The message is: >> >> undefined method `jolts_registries_path' for >> #<#:0x1cf7aa0> >> >> What does that mean? > >Have you put an entry for jolts_registries in routes.rb? Probably >something like >resources :jolts_registries I have match '/registries' => 'registries#edit; It clearly finds the route, otherwise it wouldn't run the edit method in registries_controller. >form_for needs the route to generate the form tag. Don't understand, which route? -- Tim Slattery slatter...@bls.gov -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] "Undefined method"
I have a controller named RegistriesController. It contains a single method: def edit @jolts_registry = JoltsRegistry.new end This runs, and the associated view is invoked. That stops on line 9: <%= form_for @jolts_registry do |f| %> The message is: undefined method `jolts_registries_path' for #<#:0x1cf7aa0> What does that mean? -- Tim Slattery slatter...@bls.gov -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Rails session ID
tomkins wrote: >Try request.session_options[:id] Thanks to all who replied. The code above worked. No doubt some of the other suggestions would have also. Many thanks from someone trying to figure out Ruby and Rails at the same time! -- Tim Slattery slatter...@bls.gov -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Rails session ID
I'm trying to retrieve the session ID in rails. I found a web page that said to use session.session_id But when I do that, I get: undefined method `session_id' for # What do I need to do? -- Tim Slattery slatter...@bls.gov -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] button_to with image
I'm calling button_to in my page, and it renders a form with a submit button just fine. But what I'd really like is instead of https://groups.google.com/groups/opt_out.