Re: [Rails] Re: How can I determine which server is used (Solved)

2013-07-05 Thread Norm Scherer
Thanks Frederick and Joel. Turns out SERVER_SOFTWARE is defined as "Apache/2.2.14 (Ubuntu)" in the environment so I can use that and also PhusionPassenger is defined when running under passenger so that would work also. Both are fairly crude but they work and that is what I need. I would pre

Re: [Rails] URL "id" not part of the params objects after post

2013-07-05 Thread Walter Lee Davis
On Jul 5, 2013, at 7:03 PM, Rodrigo Lueneberg wrote: > Sorry, I just come from .net and I am used to Request.Querystring[] > which is able to fetch any URL parameter on post. The Request object, in > this case, takes care storing the URL parameter values. One other idea > you just gave me is t

[Rails] Re: URL "id" not part of the params objects after post

2013-07-05 Thread Rodrigo Lueneberg
Sorry, I just come from .net and I am used to Request.Querystring[] which is able to fetch any URL parameter on post. The Request object, in this case, takes care storing the URL parameter values. One other idea you just gave me is to create an input field which would obtain the value from the

Re: [Rails] myModel.all returns only 138 records

2013-07-05 Thread Colin Law
On 5 July 2013 18:06, zip py wrote: > Hi > > I have a Rail 4 with Postrgesql 9.1 setup that is working fine, apart > from I just ran into an issue. > > Lets say I have a model called MyModel that has 150 records. > > If in IRB I try: > >> test = MyModel.all > > Only 138 records are returned. How

[Rails] Re: No ActionView module in Rails Edge API. Did they remove it from the framework?

2013-07-05 Thread Robert Walker
Wins Lin wrote in post #1114551: > I found that there is no ActionView module in > http://edgeapi.rubyonrails.org/ > Did they remove it from the framework? I'm not sure what's up there. Maybe they are reworking that section in the edge version of the API docs. ActionView is still listed in the r

[Rails] No ActionView module in Rails Edge API. Did they remove it from the framework?

2013-07-05 Thread Wins Lin
I found that there is no ActionView module in http://edgeapi.rubyonrails.org/ Did they remove it from the framework? -- 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 grou

[Rails] Re: URL "id" not part of the params objects after post

2013-07-05 Thread Robert Walker
Rodrigo Lueneberg wrote in post #1114538: > Thanks Robert, You just gave some insight. You're right I should use > form_for, but I just want to point that the user id is indeed passed in > the URL above and I can reference a Model object even when not using a > form_for. But I don't understand why

[Rails] Re: URL "id" not part of the params objects after post

2013-07-05 Thread Rodrigo Lueneberg
Thanks Robert, You just gave some insight. You're right I should use form_for, but I just want to point that the user id is indeed passed in the URL above. But I don't understand why it is not part of the "request" object querystring parameters? Any Framework should be able to capture both pos

[Rails] Re: URL "id" not part of the params objects after post

2013-07-05 Thread Robert Walker
Rodrigo Lueneberg wrote in post #1114532: > <%= form_tag('/users/delete') do %> > <%= submit_tag 'Click here to delete this user' %> > <% end %> > > When the form is posted, params[:id] does not exist, why? Because you're using for_tag instead of form_for: <%= form_for :user, :method => :dele

[Rails] Re: how to use single login page for users in four models

2013-07-05 Thread Robert Walker
ram kris wrote in post #1114502: > how to use single login page for users in four models You have not given enough detail in your question to know what you're asking. Are you saying that you have four different types of users? If so then why do you have four models instead of doing role based a

[Rails] URL "id" not part of the params objects after post

2013-07-05 Thread Rodrigo Lueneberg
Why is the URL "id" element not part of the params objects after submitting a form via form_tag? Steps: 1. Go to URL http://localhost:3000/users/delete?id=45 2. Press Submit button 3. Read id param in order to delete user, then redirect form Delete Confirmation <%= form_tag('/users/delete') do %

[Rails] myModel.all returns only 138 records

2013-07-05 Thread zip py
Hi I have a Rail 4 with Postrgesql 9.1 setup that is working fine, apart from I just ran into an issue. Lets say I have a model called MyModel that has 150 records. If in IRB I try: > test = MyModel.all Only 138 records are returned. If I now try: > lastRecord = test.last The record I get h

[Rails] Re: Ruby on Rails sessions

2013-07-05 Thread Robert Walker
unknown wrote in post #1114514: > I'm learning RoR and i would like to know more about the sessions in RoR > > Can anyone give me a good example for a session in a web application? or > good pages for learning? > (not: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book :P) There's really

[Rails] Re: How can I determine which server is used

2013-07-05 Thread Frederick Cheung
On Friday, July 5, 2013 5:48:00 AM UTC+1, Norm wrote: > > Rails 2.3.15 > The system may be run using mongrel or apache/passenger. Some functions > are not supported in mongrel 1.1.5 but work in apache/passenger therefore > I want to know what server is being used so I can alter behavior as >

[Rails] Ruby on Rails sessions

2013-07-05 Thread ciaodarwin . da
Hello I'm learning RoR and i would like to know more about the sessions in RoR Can anyone give me a good example for a session in a web application? or good pages for learning? (not: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book :P) Thanks -- You received this message because yo

[Rails] how to use single login page for users in four models

2013-07-05 Thread ram kris
how to use single login page for users in four models -- 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 rubyonra

[Rails] Re: paperclip rotate image

2013-07-05 Thread Ben B.
Dheeraj Kumar wrote in post #1095758: > If you're using paperclip, just add some post-processors. > > https://github.com/thoughtbot/paperclip#post-processing > > -- > Dheeraj Kumar Im using image rotating lib found by Google.here is the link http://www.rasteredge.com/how-to/csharp-imaging/rotate-i

[Rails] Re: How can I determine which server is used

2013-07-05 Thread Joel Pearson
I suppose you could check the environment from within the relevant function. -- 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, se