Re: [Rails] Better solution for rake db:migrate

2012-03-28 Thread Darshan Patel
hello -- 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 optio

[Rails] Re: collection_select

2012-03-28 Thread Beena Shetty
I don't think there should be any issue with this syntax then also you can try this one f.collection_select(:brand_id, Brand.all, :id, :name, :include_blank => "Select a Brand" ) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Gr

Re: [Rails] Deploying RoR app

2012-03-28 Thread Paul Lopez
+1 with Heroku On Thu, Mar 29, 2012 at 7:08 AM, Fernando Almeida < ferna...@fernandoalmeida.net> wrote: > Can you to run your app in Heroku ? Is very easy. > > If you want to have a custom or full control of the environment, you can > to read the book Deploying > Rails

Re: [Rails] Deploying RoR app

2012-03-28 Thread Fernando Almeida
Can you to run your app in Heroku ? Is very easy. If you want to have a custom or full control of the environment, you can to read the book Deploying Rails . 2012/3/27 ja > Good evening. > I've consulted wikis, old threa

[Rails] Re: (de)serialization problem with rails 3.2

2012-03-28 Thread Frederick Cheung
On Mar 27, 9:22 pm, Gabriel Williams wrote: > Any update on this?  Serialization just plain isn't working for me using > 3.2. > Which version are you using ? Rails 3.2.2 fixed some behaviour in that respect for us. Fred > Gabriel > > > > > > > > On Thursday, February 9, 2012 10:09:38 AM UTC-

[Rails] [GIG] $500 For Speed Improvements

2012-03-28 Thread Rich Jones
Hey Rails folks! This gig just popped on our system, might be an easy few bucks for anybody here who knows how to write fast code! http://gun.io/contracts/67/improve-site-speed-for-startup Thanks! Rich Gun.io ps, if you think this was an inappropriate post, please email me to let me know and

[Rails] Performance for SOAP and HTTP

2012-03-28 Thread mabeh...@aol.com
Hi everyone, I hope someone can help me with the following problem. I want to issue SOAP request from rails to connect to a legacy system in the backend. First I tried savon as a SOAP client. Everything worked fine, but the performance was bad. The following code client = Savon::Client.new cli

[Rails] best_in_place

2012-03-28 Thread Victor Augusto
Pessoal, Estou com a seguinte dúvida, utilizando o best_in_place: A seguinte linha de código https://gist.github.com/228 Exibe por padrão os valores "No" e "Yes". Gostaria de saber como exibir o checkbox marcado ou não, dependendo do seu valor. -- You received this message because you ar

[Rails] Model associations and arrays of hashes

2012-03-28 Thread @jikche
Hi everyone, I'm new to ruby/rails and trying to build a simple Projects / Tags app where Projects and Tags are associated as has_and_belongs_to_many to each other. It's basically a simple list of projects that have tags associated, and those tags in turn can be re- used by multiple projects. I've

[Rails] Re: (de)serialization problem with rails 3.2

2012-03-28 Thread Gabriel Williams
Any update on this? Serialization just plain isn't working for me using 3.2. Gabriel On Thursday, February 9, 2012 10:09:38 AM UTC-8, tigrish wrote: > > I'm seeing the same problem after having upgraded to rails 3.2 . > > No custom serializer for me, just a regular serialized field. > > Previou

[Rails] Deploying RoR app

2012-03-28 Thread ja
Good evening. I've consulted wikis, old threads, forums, everything, in order to understand/find a way to deploy RoR with minimum effort. I've developed it using WebBrick to check functionality; now I want to deploy it in a net apache server (using plesk) which I am client of. It seems plesk suppor

Re: [Rails] Re: difference between build_ and .build

2012-03-28 Thread Peter Vandenabeele
On Wed, Mar 28, 2012 at 8:41 PM, Tom Tom wrote: > LED wrote in post #1053782: >> hi im new in Ruby on rails and currently working with a reservation >> system can anyone explain what is the difference between >> current_package = build_reservation_package(:package_id => package_id) >> abd >> curre

Re: [Rails] Using @current_user in tests

2012-03-28 Thread Colin Law
On 28 March 2012 20:22, Neil Bye wrote: > I am still trying to run this test > setup do > >    @comment = comments(:hello) >    @comment.commenter = "cleb" >    @comment.body = "hello" >    @comment.user_id = 1 >    @cuser = User.find_by_id(session[:user_id]) >  end > test "should create comment"

[Rails] Re: difference between build_ and .build

2012-03-28 Thread Tom Tom
LED wrote in post #1053782: > hi im new in Ruby on rails and currently working with a reservation > system can anyone explain what is the difference between > current_package = build_reservation_package(:package_id => package_id) > abd > current_package =reservation_package.build(:package_id => pac

[Rails] Re: Re: test Couldn't find User without an ID

2012-03-28 Thread Neil Bye
Cpx Cpx wrote in post #1053588: > This line: > post :create, :comment => @comment.attributes > > The second parameter (hash) is the content of params in your controller. > So > basically your params[:comment] would be @comment.attributes > > So if you expected params[:user_id] then you should pass

[Rails] Using @current_user in tests

2012-03-28 Thread Neil Bye
I am still trying to run this test setup do @comment = comments(:hello) @comment.commenter = "cleb" @comment.body = "hello" @comment.user_id = 1 @cuser = User.find_by_id(session[:user_id]) end test "should create comment" do assert_difference('Comment.count') do po

[Rails] How does a has_many :through association and its join model attribute interact?

2012-03-28 Thread Tom Tom
I am having real difficulty getting my head around the issue of setting this attribute, units_alloc, in my join model? My models: class Contract < AR::Base has_many :codelines has_many :codes, :through => :codelines accepts_nested_attributes_for :codes attr_accessible :codes_a

[Rails] [JOB] Multiple in NYC

2012-03-28 Thread OSS
I've got multiple clients in New York City seeking full time or contract Rails Developers. All roles are on-site so if you're in the market for a new position, please feel free to reach out to me in confidence and I can supply you with who my clients are and what they are looking for. Salaries rang

[Rails] difference between build_ and .build

2012-03-28 Thread LED
hi im new in Ruby on rails and currently working with a reservation system can anyone explain what is the difference between current_package = build_reservation_package(:package_id => package_id) abd current_package =reservation_package.build(:package_id => package_id) because i tried using the fir

Re: [Rails] Unable to invoke rake task from cron

2012-03-28 Thread Allan Wind
On 2012-03-28 09:55:42, Priyanka Pathak wrote: > Hello, >Unable to invoke the custom rake task through cron under bundler. > Same task invoke without bundler. Anyone please suggest solution? > > Here is the cron: > > */1 * * * * cd /home/rails_app && /usr/bin/bundle exec rake say_hi >> > /hom

Re: [Rails] [ANN] Rails 3.2.3.rc1 was released!

2012-03-28 Thread Santiago Pastorino
This https://github.com/rails/rails/commit/84ca8c8cd07d700598e87b418370268f146b122c was merged an rc2 is coming soon. On Wed, Mar 28, 2012 at 12:13 PM, JGW Maxwell wrote: > That seems like it breaks any kind of progressive AJAX enhancement, since a > remote submit form, submitted normally, will

Re: [Rails] [ANN] Rails 3.2.3.rc1 was released!

2012-03-28 Thread JGW Maxwell
That seems like it breaks any kind of progressive AJAX enhancement, since a remote submit form, submitted normally, will now fail CSRF protection. On Wednesday, 28 March 2012 04:25:14 UTC+1, bill walton wrote: > > Hi Santiago, > > On Tue, Mar 27, 2012 at 12:16 PM, Santiago Pastorino > wrote: > >

[Rails] Re: why doesn't .where() honor polymorphism?

2012-03-28 Thread Tim Shaffer
When you write "belongs_to :parent" Rails expects there to be a class called Parent. If you want this to be related to the MyModel class, you'll need to explicitly state that: belongs_to :parent, :class_name => 'MyModel' -- You received this message because you are subscribed to the Google G

Re: [Rails] How to use One controller's CRUD methods from another controller?

2012-03-28 Thread Colin Law
On 28 March 2012 12:54, Pallav_bfs wrote: > In a sample app,we have one controller called employee_controller.This > one has its model and view parts. > Now can we create another controller(say,emp_controller,which > shouldn't have model or view parts) in such a way that one can access > all emplo

[Rails] How to use One controller's CRUD methods from another controller?

2012-03-28 Thread Pallav_bfs
In a sample app,we have one controller called employee_controller.This one has its model and view parts. Now can we create another controller(say,emp_controller,which shouldn't have model or view parts) in such a way that one can access all employee's methods through emp_controller. That means,GET

[Rails] collection_select

2012-03-28 Thread Sneha Kachroo
_form.html.haml = f.label :Select_Brand, "Select_Brand*".html_safe = collection_select(:brand_name, :brand_id, Brand.all, :id, :name, :prompt => "Select a Brand" ) show.html.haml file %table %tr %td Brand_Name : %td = @message.brand_id After writing this code I am not a

[Rails] Re: how to use wicked_pdf

2012-03-28 Thread Dheeraj Kumar
@OP: Did you even try reading the github's Readme before posting? It has very clear documentation. Please do that from next time. Dheeraj Kumar On Wednesday 28 March 2012 at 4:18 PM, Priyanka Pathak wrote: > Hi, > Hope below reference is help you out. > http://priyankapathak.wordpress.com/

[Rails] Re: how to use wicked_pdf

2012-03-28 Thread Priyanka Pathak
Hi, Hope below reference is help you out. http://priyankapathak.wordpress.com/2010/08/20/convert-html-to-pdf-using-webkit/. -- 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 gro

[Rails] how to use wicked_pdf

2012-03-28 Thread honey ruby
hi everyone i want to convert my html file to pdf. i thought of using prawn but i have to do coding for prawn pdf again but when i searched i found wicked pdf can any one help me out how to use wicked pdf. Thanks in advance -- You received this message because you are subscribed to the

[Rails] Re: Device Convention for Scope ?

2012-03-28 Thread Beena Shetty
I would suggest you to use cancan gem instead of devise scope or namespace, it would be necessary to understand and implement. -- 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 g

[Rails] Re: Models in sub-folders in Rails 3

2012-03-28 Thread Beena Shetty
Hi, In model i.e app/models/sub_folder/posts.rb you need to specify sub_folder namespace to it then it will work. Eg:- class SubFolder::Post < ActiveRecord::Base end whenever u fire any query you need to specify SubFolder::Post.all Then only it will work . -- Posted via http://www.ruby-fo

[Rails] Unable to invoke rake task from cron

2012-03-28 Thread Priyanka Pathak
Hello, Unable to invoke the custom rake task through cron under bundler. Same task invoke without bundler. Anyone please suggest solution? Here is the cron: */1 * * * * cd /home/rails_app && /usr/bin/bundle exec rake say_hi >> /home/crontab_errors.txt -- Posted via http://www.ruby-forum.com/