search for: arunrock

Displaying 3 results from an estimated 3 matches for "arunrock".

Did you mean: arunrocks
2009 Nov 18
4
rails newbie : routing error
After much ado about the naming of model adn controllers... model : Expense controller : Expenses route : map.resources :expenses Here I am using mysql database and created a unique index, since db:migrated created an id object and made it as primary key. Now in the def create @expense = Expense.new(params[:expense]) if @expense.save flash[:viola] = ''New expense saved.. be
2010 Apr 28
2
Rails - associations help
Hi I have two models . Dbase -------- name vendor type port defuser - default user name Users ------- username password email I need to build an association between these two in that the dbase model''s defuser needs to be present in the users table. I am from a relational database background so am trying hard to understand rails associations. What should I do to associate the
2010 Oct 16
3
Doubt with symbols in Rails
I was trying to write a wrapper for number_to_currency to return currency in pounds. I used a helper class to do this. def number_to_pounds(amt) number_to_currency(amt, :unit => "£") end This works fine, but I am trying to understand why I can''t use a symbol to pass the values. I thought symbols were like pointers. (you now know I am a newbie). def