[Rails] Re: At least one entry for DB

2012-03-10 Thread Soichi Ishida
Thanks! Finally I got it done. after_save :create_first_script private def create_first_script @script = Script.new(:video_id => self.id, :startp => 0, :text => 'ToDo: ') @script.save end soichi -- Posted via http://www.ruby-forum.com/. -- You received this message because

[Rails] Re: My first app. How should I approach this association thing?

2012-03-10 Thread Agis A.
Also, what about the controllers? Would I need all of them? Right now I have 3. I'm just thinking now, maybe the whole approach (following the RESTful architecture) isn't the best choice for my app. Could I maybe do something like app.com/?vendor=blah&category=blah. -- You received this mess

[Rails] Re: undefined local variable or method 'game'

2012-03-10 Thread Roger Patrick
No worries, I solved the code :) -- 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 group, send emai

[Rails] Re: undefined local variable or method 'game'

2012-03-10 Thread Roger Patrick
Ah Cheers Bruno, that fixed my problem :) I am wondering if there is any way to do current_user as well as user in one post e.g. hi user (jon) the current_user (adam) has registered an interest in your post? -- Posted via http://www.ruby-forum.com/. -- You received this message because you

[Rails] My first app. How should I approach this association thing?

2012-03-10 Thread Agis A.
Hi people. I'm a newbie so bare with me :P This is my first rails application: https://github.com/Agis-/ehm . It's an app where visitors have the ability to see Offers submitted from Vendors. These Offers also belong to Categories. So Offers, Vendors and Categories are the models & resources in

Re: [Rails] undefined local variable or method 'game'

2012-03-10 Thread Bruno Coelho
You are not passing the variable game to method 'email'. g = GameTrade.game_interest(user, game) Don't you have to do this? g = GameTrade.game_interest(user, @game) Bruno Coelho Santiago On Sat, Mar 10, 2012 at 3:50 PM, Roger Patrick wrote: > I am doing a web shop assignment and have got a p

[Rails] Cartographer shows correct info box BUT over wrong marker

2012-03-10 Thread Abram
Hi guys (and gals), The code formatting is so nice on SO.com, so I thought I'd just share my post in hopes that someone from the group can help. http://stackoverflow.com/questions/9643786/cartographer-shows-correct-info-box-but-over-wrong-marker Feel free to answer back via email if you don't ha

[Rails] undefined local variable or method 'game'

2012-03-10 Thread Roger Patrick
I am doing a web shop assignment and have got a problem with my action mailer. I get an error undefined local variable or method 'game' I have the following in my mailer: def game_interest(user, game) @user = user @game = Game mail :to => user.email, :subject => "Game Interest" e

[Rails] Re: Passing javascript variable to ruby code

2012-03-10 Thread Robert Walker
yrkapil wrote in post #1050834: > I am trying to implement an flexigrid in ruby on rails... > I am successful in implementing the flexigrid code.. > Then i tried to implement a dialog box for "New User" .. It worked > fine .. When i click on the Add New User the _form.html.erb loads into > the dial