Re: [Rails] Best Practice

2011-01-06 Thread Colin Law
On 5 January 2011 22:56, Rob Biedenharn r...@agileconsultingllc.com wrote: On Jan 5, 2011, at 5:21 PM, Colin Law wrote: On 5 January 2011 21:45, Brian Ablaza li...@ruby-forum.com wrote: I have an app that manages tapes. Each tape has a number (separate from the record ID in MySQL). When a

Re: [Rails] [Rails 3] link_to_remote, no action

2011-01-06 Thread Colin Law
On 6 January 2011 02:16, Me chabg...@gmail.com wrote: The url in the link to remote below does not have the action in the url. Ideas? link_to_remote(comment.text, :url = {:controller='workshop_comments',:action='index',:id=comment})) The index action is not required in the url as index should

[Rails] Re: rvm and phusion passenger

2011-01-06 Thread Tom Mac
Hi Thanks for the reply. I followed http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/ I started with passenger start -a 127.0.0.1 -p 3000 -d And I am getting an error. Complete trace is attached. Please have a look Thanks Attachments:

[Rails] Re: HTML5 video not played in ipad

2011-01-06 Thread Ben Eggett
Sorry, haven't been in the forums for a couple days. Try creating a .htaccess file in you public directory (if its not already there) and add the following lines to it: AddType video/ogg .ogv AddType video/mp4 .mp4 AddType video/webm .webm SetEnvIfNoCase Request_URI \.(og[gv]|mp4|m4v|webm)$

[Rails] Problem in the rubyonrails getting started tutorial

2011-01-06 Thread Ashleigh
Hello, I was just working my way pretty carefully through the getting started tutorial and I've hit an unusual snag that I can't make any sense of. After adding the authenticate before filter to my posts controller I was presented with this error message: Routing Error undefined method `Â Â

[Rails] Re: How to make this SQL Query?

2011-01-06 Thread thoen
Have you considered an inner and outer join to the courses_times table? select distinct courses.* from courses inner join course_times monday_courses on courses.id = monday_courses.course_id and monday_courses.time_id = 1 left outer join course_times non_monday_courses on courses.id =

[Rails] Looking for Examples

2011-01-06 Thread Thuy Nhien
Where can I find examples of Ruby codes? -- Thuy Nhien DOAN Mobile phone: +84 923 862 630 OFFSHORING 2.1: http://www.facebook.com/home.php?sk=group_13400954319ap=1 - “Your heart is my piñata.” -- You received this message because

Re: [Rails] Problem in the rubyonrails getting started tutorial

2011-01-06 Thread Colin Law
On 6 January 2011 09:48, Ashleigh labaumgard...@gmail.com wrote: Hello, I was just working my way pretty carefully through the getting started tutorial and I've hit an unusual snag that I can't make any sense of. After adding the authenticate before filter to my posts controller I was

Re: [Rails] Looking for Examples

2011-01-06 Thread Colin Law
On 6 January 2011 10:18, Thuy Nhien thuynhien.d...@gmail.com wrote: Where can I find examples of Ruby codes? Try the Pickaxe Ruby book. Colin -- 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

[Rails] Not able to insert value in rails console

2011-01-06 Thread Sathiyaraj Gurusamy
I am using authlogic for authentication in rails 3.0.3 with ruby 1.9.2 Using activerecord-sqlserver-adapter (3.0.5) windows with sqlserver database when i create user details in rails console, i am getting below error,

[Rails] Is mislav-will_paginate-v2.3.14 thread safe ?

2011-01-06 Thread Prachi Tripathi
I am using mislav-will_paginate-v2.3.14 in my application and Rails(Version 2.3.5) with thread safe. Is mislav-will_paginate-v2.3.14 thread safe ? Thanks in advanced. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby

Re: [Rails] Is mislav-will_paginate-v2.3.14 thread safe ?

2011-01-06 Thread Rajarshi
yes it is without using plugins u can also create pagination very simple it is On Thu, Jan 6, 2011 at 5:50 PM, Prachi Tripathi li...@ruby-forum.comwrote: I am using mislav-will_paginate-v2.3.14 in my application and Rails(Version 2.3.5) with thread safe. Is mislav-will_paginate-v2.3.14

Re: [Rails] Not able to insert value in rails console

2011-01-06 Thread Rajarshi
I think this is for your sql server adapter configuration check it On Thu, Jan 6, 2011 at 5:38 PM, Sathiyaraj Gurusamy li...@ruby-forum.comwrote: I am using authlogic for authentication in rails 3.0.3 with ruby 1.9.2 Using activerecord-sqlserver-adapter (3.0.5) windows with sqlserver

Re: [Rails] Looking for Examples

2011-01-06 Thread Rajarshi
if send me some money i will give you some best book of ruby but u have to pay 100$ for it On Thu, Jan 6, 2011 at 5:23 PM, Colin Law clan...@googlemail.com wrote: On 6 January 2011 10:18, Thuy Nhien thuynhien.d...@gmail.com wrote: Where can I find examples of Ruby codes? Try the Pickaxe

[Rails] Re: How to make this SQL Query?

2011-01-06 Thread Frederick Cheung
On Jan 5, 10:59 pm, Fernando Leandro fernandoleandro1...@gmail.com wrote: Thanks Fred, Well.. i could make it work... I dont know why, but it wastes about 25 seconds to give me query result... Is it normal? the number of registers its like 8000 for courses, 13000 for coursers_times and

Re: [Rails] Best Practice

2011-01-06 Thread Rob Biedenharn
On Jan 6, 2011, at 3:35 AM, Colin Law wrote: On 5 January 2011 22:56, Rob Biedenharn r...@agileconsultingllc.com wrote: On Jan 5, 2011, at 5:21 PM, Colin Law wrote: On 5 January 2011 21:45, Brian Ablaza li...@ruby-forum.com wrote: I have an app that manages tapes. Each tape has a number

[Rails] Re: Best Practice

2011-01-06 Thread Alpha Blue
I would add a custom param called params[:updatable] to both the create an update actions of the controller, and pass the values of true from create and false from update to the model. The model allows the field to be saved if true. Then create a simple helper for the form logic to decide

[Rails] Re: Not able to insert value in rails console

2011-01-06 Thread Alpha Blue
More than likely related to this issue: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/closed/#issue/69 -- 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 post to this

Re: [Rails] Re: Best Practice

2011-01-06 Thread Colin Law
On 6 January 2011 13:43, Alpha Blue li...@ruby-forum.com wrote: I would add a custom param called params[:updatable] to both the create an update actions of the controller, and pass the values of true from create and false from update to the model. The model allows the field to be saved if

[Rails] Re: Rails, Advanced Email Processing

2011-01-06 Thread Steve S.
Hey. This isn't a terrible thing to undertake but there's not so much information available. I wrote a couple of blog posts about the subject of receiving email(http://steve.dynedge.co.uk/2010/09/07/incoming-email-in-rails-3-choosing-the-right-approach/) and testing

[Rails] Re: Problem in the rubyonrails getting started tutorial

2011-01-06 Thread Alpha Blue
As a test, I would place the before_filter in the Application Controller to ensure it's working. If you don't receive an error, then do as Colin suggested above. If you do, post the error as instructed above. In the test within the application controller just put: before_filter :authenticate

[Rails] Re: Re: Best Practice

2011-01-06 Thread Alpha Blue
Colin Law wrote in post #972809: I don't see what that accomplishes. If the field is not editable in the view then the value will not be passed in params unless a hand-crafted post is sent. If a hand-crafted post is sent then it can include the updatable flag so a malicious person can still

[Rails] Re: Re: Best Practice

2011-01-06 Thread Marnen Laibow-Koser
Colin Law wrote in post #972809: On 6 January 2011 13:43, Alpha Blue li...@ruby-forum.com wrote: I would add a custom param called params[:updatable] to both the create an update actions of the controller, and pass the values of true from create and false from update to the model. The model

[Rails] Re: find_or_create : how to know the resulting operation ?

2011-01-06 Thread pepe
Just a thought. Maybe you can use a call back before the record is saved to set up a virtual attribute based on the result of new_record? On Jan 5, 3:52 am, Fabrice Fabrisss li...@ruby-forum.com wrote: hello, find_or_create_by has a different behaviour according to the existence of the

Re: [Rails] Re: Re: Best Practice

2011-01-06 Thread Colin Law
On 6 January 2011 14:04, Alpha Blue li...@ruby-forum.com wrote: Colin Law wrote in post #972809: I don't see what that accomplishes.  If the field is not editable in the view then the value will not be passed in params unless a hand-crafted post is sent.  If a hand-crafted post is sent then it

[Rails] Re: ajax history.

2011-01-06 Thread Nick
I haven't played with Ajax history yet, but this new RailsCast might be helpful: http://railscasts.com/episodes/246-ajax-history-state -- 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

[Rails] Re: Get a value from previous page

2011-01-06 Thread Jose tomas R.
I dont need @order ar params I need it as a value -- 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 post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this

Re: [Rails] Re: Get a value from previous page

2011-01-06 Thread Colin Law
On 6 January 2011 14:25, Jose tomas R. li...@ruby-forum.com wrote: Please quote the previous message and insert your comments at the appropriate point, this makes it easier to follow the thread. I dont need @order ar params I need it as a value I have no idea what you mean by that.

Re: [Rails] ajax history.

2011-01-06 Thread Walter Lee Davis
On Jan 5, 2011, at 7:18 AM, Mauro wrote: but it seems that the new javascript api history.pushState doesn't work as well as jquery.ba-bbq.js What are you basing this on? pushState only works in browsers that support it, so Safari and a few other cutting-edge browsers, and nothing else,

Re: [Rails] [Rails 3] link_to_remote, no action

2011-01-06 Thread Chris Habgood
It was going to the create action even though it said WorkCommentsController#index On Thu, Jan 6, 2011 at 02:52, Colin Law clan...@googlemail.com wrote: On 6 January 2011 02:16, Me chabg...@gmail.com wrote: The url in the link to remote below does not have the action in the url. Ideas?

Re: [Rails] [Rails 3] link_to_remote, no action

2011-01-06 Thread Colin Law
On 6 January 2011 15:21, Chris Habgood chabg...@gmail.com wrote: It was going to the create action even though it said WorkCommentsController#index Please don't top post, it makes it difficult to follow the thread. Insert your reply at the appropriate points in the previous message. Thanks. If

[Rails] Re: find_or_create : how to know the resulting operation ?

2011-01-06 Thread Marnen Laibow-Koser
Fabrice Fabrisss wrote in post #972422: hello, find_or_create_by has a different behaviour according to the existence of the instance in the database, is it possible to know the resulting operation (find or create) which has been actually executed ? Why do you care? What's your use case?

[Rails] Re: Best Practice

2011-01-06 Thread Robert Pankowecki (rupert)
...and this is why attr_protected sucks so bad.  There oughta be an easy way of saying reject these attributes, but only for certain actions. Unfortunately, Rails doesn't, and perhaps can't, work that way, so we're stuck with clumsy hash merges in the controller. I wonder if a better way is

[Rails] Re: find_or_create : how to know the resulting operation ?

2011-01-06 Thread Fabrice Fabrisss
Thank you for your answers, I like the solution with the 'initialize' function but I still haven't tried it. I have a counter which counts the number of new occurence I will insert in the database, that's why I want to be able to distinguish both cases, Sincerely, Fabrice -- Posted via

[Rails] Re: find_or_create : how to know the resulting operation ?

2011-01-06 Thread Marnen Laibow-Koser
Please quote when replying. Fabrice Fabrisss wrote in post #972838: Thank you for your answers, I like the solution with the 'initialize' function but I still haven't tried it. I have a counter which counts the number of new occurence I will insert in the database, that's why I want to be

[Rails] Re: Best Practice

2011-01-06 Thread Marnen Laibow-Koser
Robert Pankowecki wrote in post #972837: ...and this is why attr_protected sucks so bad. There oughta be an easy way of saying reject these attributes, but only for certain actions. Unfortunately, Rails doesn't, and perhaps can't, work that way, so we're stuck with clumsy hash merges in the

[Rails] Re: Looking for Examples

2011-01-06 Thread Robert Walker
Thuy Nhien wrote in post #972774: Where can I find examples of Ruby codes? https://github.com/languages/Ruby -- 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 post to this group, send email to

[Rails] Issue with setting up of Phusion

2011-01-06 Thread Bhupendra
# I successfully installed passenger on my window os by running command C:\ gem install passenger when i run command C:\ passenger-install-apache2-module getting following error... Please help me.. Thank in advance -- ←[33m←[44m←[1mWelcome to the

Re: [Rails] cucumber stories for Ajax in rails3

2011-01-06 Thread Rajalakshmi velu
Hi, You can use *selenium *or *capybara* with cucumber to handle ajax request and javascript calls. On Wed, Jan 5, 2011 at 3:09 PM, Mallikarjun rao mallikarjun...@indigenius.com wrote: how can we manage the cucumber stories for Ajax for rails3 -- You received this message because you

[Rails] Re: Issue with setting up of Phusion

2011-01-06 Thread Frederick Cheung
On Jan 6, 4:18 pm, Bhupendra bhupendra.mis...@gmail.com wrote: # I successfully installed passenger on my window os by running command C:\ gem install passenger when i run command C:\ passenger-install-apache2-module getting following error... Please help me.. Thank in advance Windows

[Rails] Change Route for Controller

2011-01-06 Thread Gambo
Hi there, i am very new to ror and i want to create a page which does the following: The user can register(devise) and can specifiy a page name e.g. jondoe. After this his account is send by email etc. Now I want to generate a page which follows the following route: www.mydomain.com/jondoe

[Rails] Document preview

2011-01-06 Thread John Butler
Hi, With images we can give the user the thumbnail to see if thats the image they are interested in. Is there anything similar around where you could give the user a preview of a file within the web page? Rails or web specific? Ive searched around but cant really find anything, JB -- Posted

[Rails] Re: Document preview

2011-01-06 Thread Marnen Laibow-Koser
John Butler wrote in post #972859: Hi, With images we can give the user the thumbnail to see if thats the image they are interested in. Is there anything similar around where you could give the user a preview of a file within the web page? Rails or web specific? Uh, what? Please explain

[Rails] Re: Change Route for Controller

2011-01-06 Thread Frederick Cheung
On Jan 6, 3:53 pm, Gambo mark.vanv...@gmail.com wrote: Hi there, i am very new to ror and i want to create a page which does the following: The user can register(devise) and can specifiy a page name e.g. jondoe. After this his account is send by email etc. Now I want to generate a page

[Rails] Re: Document preview

2011-01-06 Thread John Butler
sorry for the poor explanation. If you have a webpage with a list of documents, when the user clicks a document then it will show them the first page of this document in a pop up window or in some type of window within the web page via ajax or something. These files are rather large and a

[Rails] Re: Document preview

2011-01-06 Thread Marnen Laibow-Koser
Please quote when replying. John Butler wrote in post #972862: sorry for the poor explanation. If you have a webpage with a list of documents, when the user clicks a document then it will show them the first page of this document in a pop up window or in some type of window within the web

Re: [Rails] Re: Document preview

2011-01-06 Thread Walter Lee Davis
On Jan 6, 2011, at 12:02 PM, Marnen Laibow-Koser wrote: These files are rather large and a user may want to see the first page/contents before deciding to download the entire document. I was wondering if there were any rails/web/js solutions for this or something similar... JavaScript

[Rails] Re: Re: Document preview

2011-01-06 Thread John Butler
Walter Davis wrote in post #972866: On Jan 6, 2011, at 12:02 PM, Marnen Laibow-Koser wrote: These files are rather large and a user may want to see the first page/contents before deciding to download the entire document. I was wondering if there were any rails/web/js solutions for this or

[Rails] Re: Re: Document preview

2011-01-06 Thread Marnen Laibow-Koser
Walter Davis wrote in post #972866: On Jan 6, 2011, at 12:02 PM, Marnen Laibow-Koser wrote: These files are rather large and a user may want to see the first page/contents before deciding to download the entire document. I was wondering if there were any rails/web/js solutions for this or

[Rails] Re: How to make this SQL Query?

2011-01-06 Thread ppgeng...@prevailhs.com
On Jan 5, 12:10 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: Jatin Kumar wrote in post #972576: But, If you are certain that you are going to use MySQL or a specific DB for an app then I guess there is no problem in going for SQL queries. Not quite.  If I need literal SQL

Re: [Rails] Re: Re: Document preview

2011-01-06 Thread Walter Lee Davis
On Jan 6, 2011, at 12:26 PM, Marnen Laibow-Koser wrote: JavaScript can *show* the preview in a nice popup or overlay, true, but I think the issue here is how do you get the preview in the first place. [...] My understanding is that the various JS preview libraries handle the preview image

[Rails] Re: How to make this SQL Query?

2011-01-06 Thread Marnen Laibow-Koser
ppgeng...@prevailhs.com wrote in post #972869: On Jan 5, 12:10pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: syntax, without proprietary extensions. This gives the best portability across databases. Just tacking on another suggestion to this if people are reading back through here: if

Re: [Rails] ajax history.

2011-01-06 Thread Mauro
On 6 January 2011 15:52, Walter Lee Davis wa...@wdstudio.com wrote: On Jan 5, 2011, at 7:18 AM, Mauro wrote: but it seems that the new javascript api history.pushState doesn't work as well as jquery.ba-bbq.js What are you basing this on? pushState only works in browsers that support it, so

[Rails] Forceing PUST vs. POST in form

2011-01-06 Thread James Byrne
I am experimenting with a combined form. I wish to force the HTTP verb for this form to PUT. However, it always uses POST when submitted and I cannot determine why. The view template code is: %=form_for( @user, :html = { :class = :edit_user_role, :id =

[Rails] Re: Forceing PUST vs. POST in form

2011-01-06 Thread Marnen Laibow-Koser
James Byrne wrote in post #972875: I am experimenting with a combined form. I wish to force the HTTP verb for this form to PUT. However, it always uses POST when submitted and I cannot determine why. Because that's the way Rails works. Many browsers don't support PUT forms, so Rails leaves

Re: [Rails] ajax history.

2011-01-06 Thread Walter Lee Davis
On Jan 6, 2011, at 12:56 PM, Mauro wrote: I've seen that railscast, I'm using chrome which support pushState. The problem is that ajax history with paginate works but if you, for example, go to a site www.google.it or whatever internet site and then push browser back button the page showed

[Rails] [ANN] RubyNation CFP and Tix Available Now!

2011-01-06 Thread Gray Herter
At RubyNation, our call for presentations is open until January 28th, and we have a limited number of super early bird tickets available now. This year's RubyNation will be held April 1-2 just outside Washington, DC. We are a two-day, two-track conference featuring 27 (or so) presentations. We

[Rails] Re: Help with div ...

2011-01-06 Thread shungite
I figured something out: I don't know how Ajax works! I read elsewhere to avoid Ajax until you've built an app, and sure enough, this being my first Rails-powered site, I'm all bogged down adding a 'cool feature.' I'm reworking an existing site, adding data-driven pages, and templates and partials

Re: [Rails] cucumber stories for Ajax in rails3

2011-01-06 Thread serialhex
how can we manage the cucumber stories for Ajax for rails3 cucumber stories? You can use *selenium *or *capybara* with cucumber to handle ajax request and javascript calls. selenium? capybara?? are those like spices you might put on a cucumber? or are they other characters in this story

[Rails] Re: cucumber stories for Ajax in rails3

2011-01-06 Thread Marnen Laibow-Koser
.serialhex .. wrote in post #972890: how can we manage the cucumber stories for Ajax for rails3 cucumber stories? You can use *selenium *or *capybara* with cucumber to handle ajax request and javascript calls. selenium? capybara?? are those like spices you might put on a cucumber? or

[Rails] Falied to create jruby instance errror message

2011-01-06 Thread Sarah Ww
Hi, this is my first attempt at doing a ruby on rails project but i can't even get started, i am trying to run glassfish 3 at the moment and get this error code in the log file from #Class:01xce6965.run(C:/Users/xxx/Documents/NetBeansProjects/RailsApplication3/config/environment.rb:9)

[Rails] Ruby on Rails for Healthcare systems

2011-01-06 Thread SW Engineer
Being interested in applying Ruby on Rails to the Healthcare sector (IT Healthcare), what do you recommend me to do as a next step after learning Ruby on Rails? In other words, what PATHWAY do you recommend someone to approach in applying Ruby on Rails to healthcare especially the CAD

Re: [Rails] Ruby on Rails for Healthcare systems

2011-01-06 Thread Walter Lee Davis
On Jan 6, 2011, at 2:23 PM, SW Engineer wrote: Being interested in applying Ruby on Rails to the Healthcare sector (IT Healthcare), what do you recommend me to do as a next step after learning Ruby on Rails? In other words, what PATHWAY do you recommend someone to approach in applying Ruby

[Rails] Re: Ruby on Rails for Healthcare systems

2011-01-06 Thread SW Engineer
Walter Davis wrote in post #972903: On Jan 6, 2011, at 2:23 PM, SW Engineer wrote: Being interested in applying Ruby on Rails to the Healthcare sector (IT Healthcare), what do you recommend me to do as a next step after learning Ruby on Rails? In other words, what PATHWAY do you recommend

Re: [Rails] ajax history.

2011-01-06 Thread Mauro
On 6 January 2011 19:14, Walter Lee Davis wa...@wdstudio.com wrote: On Jan 6, 2011, at 12:56 PM, Mauro wrote: I've seen that railscast, I'm using chrome which support pushState. The problem is that ajax history with paginate works but if you, for example, go to a site www.google.it or

[Rails] Re: Falied to create jruby instance errror message

2011-01-06 Thread Sarah Ww
I'm sorry but i am a bit computer illterate and i am not sure how to proceed with these error messasges Would reinstalling glassfish be worth trying? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: recommended HTTP client?

2011-01-06 Thread Tony Primerano
It looks like HTTParty uses Net::HTTP so I'll just stick with that. I got burned by so many deprecated gems moving from Rails 2 to Rails 3 that use them sparingly now. :-\ On Jan 4, 10:53 am, Marnen Laibow-Koser li...@ruby-forum.com wrote: TonyPrimeranowrote in post #972234: In the past I

[Rails] Re: Falied to create jruby instance errror message

2011-01-06 Thread Marnen Laibow-Koser
Sarah Ww wrote in post #972911: I'm sorry but i am a bit computer illterate Then get a little less so before you start programming. and i am not sure how to proceed with these error messasges Would reinstalling glassfish be worth trying? I don't know. I think Glassfish probably has its

[Rails] Re: recommended HTTP client?

2011-01-06 Thread Marnen Laibow-Koser
Please quote when replying. Tony Primerano wrote in post #972913: It looks like HTTParty uses Net::HTTP so I'll just stick with that. Stick with *which*? I got burned by so many deprecated gems moving from Rails 2 to Rails 3 that use them sparingly now. :-\ I see this attitude a lot, and

Re: [Rails] ajax history.

2011-01-06 Thread Walter Lee Davis
On Jan 6, 2011, at 2:55 PM, Mauro wrote: On 6 January 2011 19:14, Walter Lee Davis wa...@wdstudio.com wrote: On Jan 6, 2011, at 12:56 PM, Mauro wrote: I've seen that railscast, I'm using chrome which support pushState. The problem is that ajax history with paginate works but if you, for

[Rails] Re: Forceing PUST vs. POST in form

2011-01-06 Thread James Byrne
Marnen Laibow-Koser wrote in post #972876: James Byrne wrote in post #972875: I am experimenting with a combined form. I wish to force the HTTP verb for this form to PUT. However, it always uses POST when submitted and I cannot determine why. Because that's the way Rails works. Many

[Rails] Re: Forceing PUST vs. POST in form

2011-01-06 Thread Marnen Laibow-Koser
James Byrne wrote in post #972918: Marnen Laibow-Koser wrote in post #972876: James Byrne wrote in post #972875: I am experimenting with a combined form. I wish to force the HTTP verb for this form to PUT. However, it always uses POST when submitted and I cannot determine why. Because

[Rails] rails console not working with my application

2011-01-06 Thread Sawan T.
Hi I have couple of issues with my application. I have an app checked out from a repository on to my local machine. rake commands like rake db:create and rake db:migrate and gem list, gem install are working with the app but not any other commands like rails generate scaffold User username:string,

[Rails] Devise login with user or admin models and Basecamp style subdomains

2011-01-06 Thread Shane Pinnell
I have separate models for Devise users and admins. I am also using Basecamp style subdomains. Everything is working well except for a few controllers and actions where I need to be able to authenticate as either a user or as an admin. Currently I have authenticate_user! set in my

[Rails] Re: rails console not working with my application

2011-01-06 Thread Marnen Laibow-Koser
Sawan T. wrote in post #972924: Hi I have couple of issues with my application. I have an app checked out from a repository on to my local machine. rake commands like rake db:create and rake db:migrate and gem list, gem install are working with the app but not any other commands like rails

[Rails] Send email with delayed job

2011-01-06 Thread Greg Ma
Hi, I want to send email with delayed job. In order to do so, I have a Notifier model with X methods sending different type of emails. In the documentation, they suggest to send email like this: class NewsletterJob Struct.new(:text, :emails) def perform emails.each { |e|

[Rails] Re: Forceing PUST vs. POST in form

2011-01-06 Thread James Byrne
Marnen Laibow-Koser wrote in post #972921: James Byrne wrote in post #972918: Then does that mean one must always provide a route for the new method, even if it makes no sense to do so within a given context? I don't understand your question. I get this error when I submit the form. no

[Rails] Re: Send email with delayed job

2011-01-06 Thread djangst
Dumb question: wouldn't you just change the parameter(s) when you call enqueue()? On Jan 6, 3:46 pm, Greg Ma li...@ruby-forum.com wrote: But in my notifier model I have X methods, does it mean I have to create a different Struc for each methods? -- You received this message because you are

[Rails] Re: rails console not working with my application

2011-01-06 Thread Sawan T.
Marnen Laibow-Koser wrote in post #972926: Sawan T. wrote in post #972924: Hi I have couple of issues with my application. I have an app checked out from a repository on to my local machine. rake commands like rake db:create and rake db:migrate and gem list, gem install are working with the

[Rails] Re: Forceing PUST vs. POST in form

2011-01-06 Thread Marnen Laibow-Koser
James Byrne wrote in post #972930: Marnen Laibow-Koser wrote in post #972921: James Byrne wrote in post #972918: Then does that mean one must always provide a route for the new method, even if it makes no sense to do so within a given context? I don't understand your question. I get

Re: [Rails] Re: rails console not working with my application

2011-01-06 Thread Colin Law
On 6 January 2011 20:55, Sawan T. li...@ruby-forum.com wrote: Marnen Laibow-Koser wrote in post #972926: Sawan T. wrote in post #972924: Hi I have couple of issues with my application. I have an app checked out from a repository on to my local machine. rake commands like rake db:create and

[Rails] jQuery vs Prototype re: Rails' helpers

2011-01-06 Thread Bill Walton
I'm considering switching from Prototype to jQuery but wonder... do the Rails helper methods like form_remote_tag and button_to_remote work with jQuery 'out of the box' ? I've got 2 apps I'd need to convert: one on 2.1.1 and the other on 2.3.2 TIA, Bill -- You received this message because

[Rails] Re: rails console not working with my application

2011-01-06 Thread Marnen Laibow-Koser
Sawan T. wrote in post #972932: Marnen Laibow-Koser wrote in post #972926: Sawan T. wrote in post #972924: Hi I have couple of issues with my application. I have an app checked out from a repository on to my local machine. rake commands like rake db:create and rake db:migrate and gem list,

[Rails] Re: Forceing PUST vs. POST in form

2011-01-06 Thread James Byrne
Marnen Laibow-Koser wrote in post #972933: But you came from it as GET, not PUT. Routes include method, not just URL. I knew that. Nonetheless that is the bit I had confused. I was trying to override the form method for the right reason but I fixed upon the wrong method, PUT, instead of

[Rails] jQuery vs Prototype re: Rails' helpers

2011-01-06 Thread Marnen Laibow-Koser
Bill Walton wrote in post #972936: I'm considering switching from Prototype to jQuery but wonder... do the Rails helper methods like form_remote_tag and button_to_remote work with jQuery 'out of the box' ? I've got 2 apps I'd need to convert: one on 2.1.1 and the other on 2.3.2 I understand

[Rails] Re: Forceing PUST vs. POST in form

2011-01-06 Thread Marnen Laibow-Koser
James Byrne wrote in post #972938: Marnen Laibow-Koser wrote in post #972933: But you came from it as GET, not PUT. Routes include method, not just URL. I knew that. Nonetheless that is the bit I had confused. I was trying to override the form method for the right reason but I fixed

[Rails] Re: recommended HTTP client?

2011-01-06 Thread Tony Primerano
On Jan 6, 3:04 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: Please quote when replying. Tony Primerano wrote in post #972913: It looks like HTTParty uses Net::HTTP so I'll just stick with that. Stick with *which*? I'll just call Net::HTTP directly. I have a simple GET request

[Rails] Re: Trouble inserting large objects into memcached

2011-01-06 Thread Wes Gamble
Ha ha - now it is an option! But only for the last two years so I don't feel stupid for doing what I did. From the memcached man page on OS X: -I size Override the default size of each slab page. Default is 1mb. Default is 1m, minimum is 1k, max is 128m. Adjusting this value

[Rails] Re: Forceing PUST vs. POST in form

2011-01-06 Thread James Byrne
Marnen Laibow-Koser wrote in post #972943: You probably don't want the form submission to be GET. You are probably right. But for now I am simply exploring how things work for a nested resource. I will rewire the controller when I figure how what I want each bit to do and how I want it to

[Rails] Re: Forceing PUST vs. POST in form

2011-01-06 Thread Marnen Laibow-Koser
James Byrne wrote in post #972946: Marnen Laibow-Koser wrote in post #972943: You probably don't want the form submission to be GET. You are probably right. But for now I am simply exploring how things work for a nested resource. I will rewire the controller when I figure how what I want

[Rails] Re: recommended HTTP client?

2011-01-06 Thread Marnen Laibow-Koser
Tony Primerano wrote in post #972944: [...] If a 1000 line gem is saving me 10 lines of code I'm better off not using it. Not necessarily true. *You* didn't have to write the 1000 lines, and you didn't have to write the extra 10 lines. Where's the downside? (I'm not saying you should put

Re: [Rails] jQuery vs Prototype re: Rails' helpers

2011-01-06 Thread Ants Pants
Aren't the remote helpers built with prototype? Best thing I ever did was move away from Prototype. On 6 January 2011 22:03, Bill Walton bwalton...@gmail.com wrote: I'm considering switching from Prototype to jQuery but wonder... do the Rails helper methods like form_remote_tag and

[Rails] Re: Re: Get a value from previous page

2011-01-06 Thread Jose tomas R.
Colin Law wrote in post #972821: On 6 January 2011 14:25, Jose tomas R. li...@ruby-forum.com wrote: Please quote the previous message and insert your comments at the appropriate point, this makes it easier to follow the thread. I dont need @order ar params I need it as a value I have no

Re: [Rails] Re: recommended HTTP client?

2011-01-06 Thread Greg Donald
On Thu, Jan 6, 2011 at 3:29 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Not necessarily true.  *You* didn't have to write the 1000 lines, and you didn't have to write the extra 10 lines.  Where's the downside? Writing 10 lines of code takes a couple minutes, depending on a gem is

Re: [Rails] Re: How to make this SQL Query?

2011-01-06 Thread Fernando Leandro
Hi thoen, Well.. i tried to use your query... select distinct courses.* from courses inner join course_times monday_courses on courses.id = monday_courses.course_id and monday_courses.time_id = 1 left outer join course_times non_monday_courses on courses.id = non_monday_courses.course_id and

[Rails] Running methods on a class in gem

2011-01-06 Thread Craig Leppan
I have installed a gem Rubygsm and dependencies I have the send sms working via the gem The following code is from the gem core file for receiving an sms: # call-seq: # receive(callback_method, interval=5, join_thread=false) # # Starts a new thread, which polls the device every

[Rails] Re: Forceing PUST vs. POST in form

2011-01-06 Thread James Byrne
Marnen Laibow-Koser wrote in post #972947: No! If you need to make the form submission GET, then something is *badly wrong*. Rails' resource mapping should make the PUT form work by default. If that isn't working, find out why. Perhaps we should take a look at your routes. I believe

[Rails] Re: rails console not working with my application

2011-01-06 Thread Sawan T.
Marnen Laibow-Koser wrote in post #972937: Sawan T. wrote in post #972932: Marnen Laibow-Koser wrote in post #972926: Sawan T. wrote in post #972924: Hi I have couple of issues with my application. I have an app checked out from a repository on to my local machine. rake commands like rake

[Rails] Re: Forceing PUST vs. POST in form

2011-01-06 Thread Robert Walker
James Byrne wrote in post #972959: No! If you need to make the form submission GET, then something is *badly wrong*. Rails' resource mapping should make the PUT form work by default. If that isn't working, find out why. Perhaps we should take a look at your routes. I believe that I know

[Rails] Re: Forcing PUT vs. POST in form

2011-01-06 Thread James Byrne
Interestingly, w3.org indicates that there are only two valid HTTP verbs for the form and the submit elements. Those are GET and POST. -- 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 post to

  1   2   >