On 16 March 2010 19:33, Rohit Shinde <[email protected]> wrote:
> Can you please advice me a way to extract just the name from there?

This will give you what you want:
<%= User.find(:all, :select => 'name', :conditions => ["id = ?", 1]).name %>

...but there are so many poor and bad-practice things going on in that
line.... It's great that you've got as far as you have - to have
working models and views - but there's some large steps you need to
take that are covered well in lots of online references and in any of
the books that deal with getting started with Ruby/Rails.
I'd suggest visiting them and getting much more comfortable with the
basics to help you to get as quickly as possible to a position where
you will be able to produce useful code.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to