Re: [Rails] Oh btw...

2012-01-02 Thread Edmond Kachale
happy = Year.new 2012 --- Edmond *Systems Developer | Blantyre | Malawi **"C++ is cool only at room temperatures" -- self.author* On Sun, Jan 1, 2012 at 6:18 PM, rajeevsharma86 wrote: > HAPPY NEW YEAR rails we love you > > On Sun, Jan 1, 2012 at 8:49 PM, kausik bakshi wrote: > >> >> >> On

[Rails] mail attachments displayed strangly in Rails 3.1

2012-01-02 Thread Mattias B.
My problem is that even though the format is perceived correctly in the mail it only shows text for my attachments. All files are pre-uploaded and just hooked on from the folder they're contained in the public folder. I send my emails through smtp in my dev / prod) environment file. I Run Rails 3.1

[Rails] Re: has_many 'Paperclip' output?

2012-01-02 Thread Nikolay
Thank you, Ahmy! Simple solutions always work fine. That's all we need. -- 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

Re: [Rails] has_many 'Paperclip' output?

2012-01-02 Thread Ahmy Yulrizka
On Mon, Jan 2, 2012 at 10:02 PM, Nikolay wrote: > #gem 'rails', '3.0.9' > #gem "paperclip", "~> 2.0" > > rails console > >contract = Contract.first > => # >files = contract.contract_files > => [# >files.first.data.url > => "/system/data/1/original/logo.png?1325513082" > > files.map(&

Re: [Rails] Check whether you migrate up or down in Rails 3.1?

2012-01-02 Thread Linus Pettersson
I see. Thank you very much Peter! Regards Linus -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/H8RtP69UakQJ. To post to this group, send email

[Rails] Ordering on Heroku and special characters (å ä ö)

2012-01-02 Thread Linus Pettersson
Hi! I just pushed an app to Heroku for the first time. I notice that the ordering is not quite correct. It is on my local machine though. The issue is that the swedish characters Å Ä and Ö are ordered like A A and O. I guess this is because some collation or locale is wrong. Any ideas on how to

Re: [Rails] Check whether you migrate up or down in Rails 3.1?

2012-01-02 Thread Peter Vandenabeele
On Mon, Jan 2, 2012 at 10:49 PM, Linus Pettersson < linus.petters...@gmail.com> wrote: > Hi! > > In Rails 3.1 there is only one method for migrations called 'change'. > Not exaclty. up and down still exist (but now instance methods instead of class methods). Google ("rails guide migrations").

[Rails] Check whether you migrate up or down in Rails 3.1?

2012-01-02 Thread Linus Pettersson
Hi! In Rails 3.1 there is only one method for migrations called 'change'. I want to run some code in a migration only when migrating up, not down. Is that possible? The issue I have is that this code is inside a migration file from Active Admin: # Create a default user AdminUser.create!(:emai

[Rails] rails3, compass and asset pipeline.

2012-01-02 Thread Mauro
Someone use compass? Reading the docs, to use compass in a rails3 application I must run "compass init rails /path/to/myrailsproject --using blueprint" (I want to use blueprint). But with asset pipeline I think it not necessary. I've created a blueprint.css.scss file and put @import "blueprint/res

[Rails] awesome polymorphic goodness in before_create

2012-01-02 Thread Fearless Fool
This isn't a question -- it's just me being astonished by yet another thing in Rails that Just Works. Here it is: = class Wizard < ActiveRecord::Base before_create :create_deferrables has_one :weather_loader, :as => :owner, :dependent => :destroy def create_deferrables self.create_w

Re: [Rails] Write functional test cases for an rails app having no model

2012-01-02 Thread Peter Vandenabeele
On Mon, Jan 2, 2012 at 7:25 PM, Anil Kumar wrote: > Hi, > > I have a rails application that has a Application controller that > exposes REST API. And for the data I am using a third party module > instead of rails Model. > > REST API: > http://myApp/plugins > > Route.rb: > match "/plugins" =>

[Rails] Write functional test cases for an rails app having no model

2012-01-02 Thread Anil Kumar
Hi, I have a rails application that has a Application controller that exposes REST API. And for the data I am using a third party module instead of rails Model. REST API: http://myApp/plugins Route.rb: match "/plugins" => "plugins#get_plugins", :via => "get" My controller has following met

[Rails] has_many 'Paperclip' output?

2012-01-02 Thread Nikolay
#gem 'rails', '3.0.9' #gem "paperclip", "~> 2.0" rails console >contract = Contract.first => #files = contract.contract_files => [#files.first.data.url => "/system/data/1/original/logo.png?1325513082" > files.map(&:data_file_name).each do |key| key end => ["logo.png", "newyear

[Rails] associations give unexpected result during rspec test

2012-01-02 Thread ruud
hello group, I recently started with the pragmatic bookshelve rspec book. In one of the latest chapters, there is an example based on the models 'message' and 'user'. A message has a recipient and an sender. Users have an association 'sent_messages' and 'received_messages'. After the example th

[Rails] Re: How can I display model validation error in view page separately beside each form field

2012-01-02 Thread Linus Pettersson
You could use formtastic. It uses inline error messages for the fields. https://github.com/justinfrench/formtastic Also, it's awesome :) Regards Linus -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web vi

[Rails] How can I display model validation error in view page separately beside each form field

2012-01-02 Thread Kausik Bakshi
How can I display model validation error in view page separately beside each form field instead top grouping message Thanks in advance kauisk -- 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

Re: [Rails] Using Rspec, factory_girl and permalink?

2012-01-02 Thread Linus Pettersson
Of course... Thank you! Sometimes when you've looked for too long on the code you get blind :) Regards Linus -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyo

Re: [Rails] Re: calling same modelling will fire multiple queries to db in rails 2.3.5?

2012-01-02 Thread BALA MANI
Hai! can you try this way: @user[0].address @user[1].address @user[2].address @user[3].address @user[4].address bye :) -- 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.

[Rails] Re: calling same modelling will fire multiple queries to db in rails 2.3.5?

2012-01-02 Thread Tushar Gandhi
why so? any reason behind it. Thanks, Tushar -- 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-talk@googlegroups.com. To unsubscribe from this gro