[Rails] [ANN] Rails 3.2.13.rc1 has been released!

2013-02-27 Thread Steve Klabnik
Yves Senn* * Accept symbols as `#send_data` :disposition value. [Backport #8329] *Elia Schito* * Add i18n scope to `distance_of_time_in_words`. [Backport #7997] *Steve Klabnik* * Fix side effect of `url_for` changing the `:controller` string option. [Backport #6003] Before: c

Re: [Rails] best file uploader?

2010-04-07 Thread Steve Klabnik
Paperclip is really good stuff. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegrou

Re: [Rails] What's the latest reliable version of Rails 2?

2010-02-19 Thread Steve Klabnik
You'd have been fine with 2.3.5 if you'd have rack 1.0.1 installed. -- 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 group, send email to rub

Re: [Rails] Re: nil object - can anyone help?

2010-02-10 Thread Steve Klabnik
considering it's user.invitation_limit, (or maybe @user), that means you need to define one or the other. -- 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 unsubscri

Re: [Rails] Re: nil object - can anyone help?

2010-02-10 Thread Steve Klabnik
Your application.html.erb? Then yeah, you're going to need @user defined in every controller. Also, is this a user that was created before you added in your invitations? If so, you won't have anything for an invitation_limit for any of your users, you'll want to do a User.all.each{|user| user.inv

Re: [Rails] Re: nil object - can anyone help?

2010-02-10 Thread Steve Klabnik
I don't see you defining @user anywhere. Which view is your code in? -- 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 group, send email to ru

Re: [Rails] Re: UJS in Rails 3 Beta

2010-02-09 Thread Steve Klabnik
I don't think that Rails 3 is using anything that wouldn't already be supported by older browsers. It's not like it's sticking in by default, just using some special named parameters. A large goal with HTML5 was backward compatibility. -- You received this message because you are subscribed to t

Re: [Rails] Re: What happened to CoC?

2010-02-08 Thread Steve Klabnik
The Rails Way certainly is the de facto Rails book... but for Rails 1.2. I'm pretty sure it was never updated for 2.x, but I could be wrong. My copy is for 1.2. In any case, yeah, as everyone else said, it should work. The "rake routes" suggestion is a good one, since you're seeing a routing error

Re: [Rails] initial insert of data

2010-02-03 Thread Steve Klabnik
You probably want to use after_create in your user model: http://www.therailsway.com/2006/12/8/idiomatic-ruby -- 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 uns

Re: [Rails] Re: role of options={}?

2010-02-03 Thread Steve Klabnik
It's a default value. In languages that don't have default values, you _always_ have to pass in an argument. For example, if you defined it this way (or if Ruby didn't support them...) def render_show_actions(resource, actions, options) When you called the function, you'd have to do this rende

Re: [Rails] Removing scaffold?

2010-01-31 Thread Steve Klabnik
Try running 'script/destroy scaffold Title:string' and seeing if that takes care of it for you. -- 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 th

Re: [Rails] cucumber vs. RSpec

2010-01-31 Thread Steve Klabnik
Yes, cucumber and rspec are both used for BDD. I personally prefer Cucumber, but some people find it offputting, and prefer their tests to be less english, more code. Both are great tools, though. On Mon, Feb 1, 2010 at 1:04 AM, pepe wrote: > I want to start diving into BDD. I have never used T

Re: [Rails] Best Practices; Deploying Updates

2010-01-28 Thread Steve Klabnik
You may also want to look into Unicorn, which can give you no-downtime deploys. -- 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 group, send e

Re: [Rails] RoR hosting help?

2010-01-28 Thread Steve Klabnik
I use both Heroku and Rackspace with my hosting. I've heard great things about Slicehost and Linode as well. -- 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 unsubs

[Rails] Re: Rails 3 and destroying models

2010-01-28 Thread Steve Klabnik
Continuing to play around with it, apparently the javascript tags aren't included in the scaffolding. When I include them all, the confirmation dialog comes up, but still makes a GET request. Maybe that just hasn't been implemented yet. Hm. On Thu, Jan 28, 2010 at 7:21 PM, Steve Kla

[Rails] Rails 3 and destroying models

2010-01-28 Thread Steve Klabnik
Has anyone been playing around with the Rails 3 code? I'm having an issue with destroying models. I started an app using Yehuda's "Spinning up a new Rails app" example. Worked great. "script/generate scaffold Post title:string body:text" Awesome. "rake db:migrate". Great. Everything works... except

Re: [Rails] is there a beta plugin that requires a beta code to allow access?

2010-01-24 Thread Steve Klabnik
You might want to check out Railscast #24. http://railscasts.com/episodes/124-beta-invitations On Sun, Jan 24, 2010 at 7:34 PM, dino d. wrote: > hi - > > i want to do some testing with live users, as many people have done > before me. has someone encapsulated this in a simple plugin that > req

Re: [Rails] how to build a welcome page?

2010-01-24 Thread Steve Klabnik
A "welcome" controller probably shouldn't be part of your admin interface... usually that name is used for the site landing page. Or am I misunderstanding the purpose of your page? Is it the main screen of your admin section? A "login" controller depends on how you're making your user accounts. I'

Re: [Rails] disable submit_tag after click

2010-01-20 Thread Steve Klabnik
When you write that onclick, don't you have to also make it submit the form? Try this: <%= submit_tag 'Save', :class => 'submit', :onclick => "document.getElementById('save_button').disabled=true;document.forms["myform"].submit();", :id => "save_button" %> changing the id, obviously. -- You rece

Re: [Rails] Re: reverting to rails 2.3.3

2010-01-20 Thread Steve Klabnik
Seriously consider fixing your problem and upgrading to 2.3.5, though. There was a big vulnerability fixed in that release: http://weblog.rubyonrails.org/2009/11/30/ruby-on-rails-2-3-5-released On Wed, Jan 20, 2010 at 9:48 PM, RubyonRails_newbie < craigwest...@googlemail.com> wrote: > Problem sol

Re: [Rails] passing hidden field data

2010-01-18 Thread Steve Klabnik
You seem to be pretty close. Have you used a tool like Firebug to inspect the value of the hidden field? You're probably looking for this: <%= f.hidden_field :patient_id, :value => @patient_id %> with @patient_id being set to whatever value you'd like it to be updated to. On Mon, Jan 18, 2010 a

Re: [Rails] Newbie question - how set up working with a subset of data (e.g. user's data)?

2010-01-15 Thread Steve Klabnik
Let me get this straight. You have users. Users have Stuff. You want a page, say, where a given user can see just their Stuff, and nobody else's? Well, you'd want to make your User have_many :stuffs, and your Stuffs belong_to :user . This'll require a user_id column in your Stuffs table. Then, fi

Re: [Rails] Re: Difference between Mongrel and Webrick

2010-01-13 Thread Steve Klabnik
There's also Unicorn. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. F

Re: [Rails] How to begin coding with RoR

2010-01-12 Thread Steve Klabnik
There's a new book that's currently a work in progress, but the first few chapters are excellent! You can read it online here: http://railstutorial.org On Tue, Jan 12, 2010 at 6:13 PM, Manish Belsare wrote: > Hey m doin a project on web application..I need 2 know how to start with > the coding u

Re: [Rails] Re: Deployment Infrastructure Stack

2010-01-11 Thread Steve Klabnik
Because the cloud is your cluster of servers. You don't deal with that problem, they do. -- 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 gro

Re: [Rails] Factories, Authentication, and Roles, oh my!

2010-01-06 Thread Steve Klabnik
Well, the purpose of Helpers is to keep your views nice and DRY, so you could make some helpers with common code that comes up because of this, that takes a user. Your helpers still end up looking like this, though, so it's not super ideal, but you've at least pushed the ugly down as far as possib

Re: [Rails] Can rails even gracefully upload?

2010-01-05 Thread Steve Klabnik
I personally use paperclip, and not attachment-fu, but I also usually end up making an Asset model that is polymorphically associated with my other models. That way, I can keep all of my file handling stuff in one place, as well as keeping the number of attachments flexible. On Tue, Jan 5, 2010 at

Re: [Rails] Re: Question regarding entering data in a has_many relations

2010-01-03 Thread Steve Klabnik
You would want each_with_index. <% @recipie.steps.each do |step, index| %> <%= index %>: <%= step.step %> <% end %> A little cleaner, and handles updating the index for you. -Steve On Sun, Jan 3, 2010 at 12:47 PM, Ooh_Gravy wrote: > So answering my own question, is this ok or i