[Rails] Logic duplication in scopes & predicates

2014-09-15 Thread fey
Consider something like that in a model: scope :recommended, -> { where('editors_selection OR rating > 9') } def recommended? editors_selection? || rating > 9 end How to DRY it up? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To u

[Rails] $ rails --version : Output checking

2014-09-15 Thread Rohan Sarker
I had a query and thank you for helping me in installing Rails. $ gem install rails Command is running correctly and installed Rails. Now I execute command: cd bin Output is: C:\Ruby200\bin Executed command: $ rails --version I get the output: DL is depreciated, please use Fiddle Rails 4.

[Rails] Re: Cannot install Rails

2014-09-15 Thread Cody Skidmore
Rohan, I started developing Rails with Windows 7 & RubyMine. After about two months, I switched to Linux Mint 16 and never looked back. Learning a new operating systems + Rails/Ruby at the same time can be a lot to take in, but it was worth it. The vast repository information available on the

[Rails] Re: Use Carrierwave with Active Admin?

2014-09-15 Thread Furqan Asghar
hey, have you managed to find the solution. i'm facing the same issue and i've been struggling to find a solution to this. On Friday, November 25, 2011 8:10:16 PM UTC+8, Ruby-Forum.com User wrote: > > Hey, > > did any of you guys manage to get Active Admin with Carrierwave working? > > When I ins

Re: [Rails] Rails 4: generic route

2014-09-15 Thread Vivek Sampara
Paolo, Take a look at Hobo Plugin. It does something very similar using DRYML ( dont repeat yourself mark up language ) Cheers On Mon, Sep 15, 2014 at 10:04 PM, Paolo Di Pietro wrote: > Hi all, > > I'd like to implement (Rails 4) a very high level (generic) abstract > controller, able to mana

Re: [Rails] Re: void value expression on model

2014-09-15 Thread Hassan Schroeder
On Tue, Sep 2, 2014 at 3:20 PM, Adrien R. wrote: > Started POST "/game" for 127.0.0.1 at 2014-09-03 00:14:49 +0200 > Processing by GameController#create as HTML > Parameters: {"utf8"=>"V", > "authenticity_token"=>"gx7TovN+tZbMxOTc91l5P/5jqviBx > eO9vlJQaxJ19No=", "game"=>{"small_blind"=>"1", "b

[Rails] Re: Re: Re: Re: void value expression on model

2014-09-15 Thread Adrien R.
Colin Law wrote in post #1157676: > On 15 September 2014 21:15, Adrien R. wrote: >> Colin Law wrote in post #1157627: >>> Sorry, I meant Player of course. >>> >> >> Here it is: >> >> class Player < ActiveRecord::Base >> belongs_to :game >> has_many :cards, as: :cardable > > What happens if you

[Rails] Ruby / Rails Developer - Contract Opportunity

2014-09-15 Thread Gayle Steuckrath
We are seeking a Ruby & Ruby on Rails Sr. Developer/Architect with experience working enterprise-level projects.Seeking candidates who are open to coming to San Diego for the duration of the contract, but some telecommuting will be allowed. This could be a great fit for you if you: * Have

Re: [Rails] Re: Re: Re: void value expression on model

2014-09-15 Thread Colin Law
On 15 September 2014 21:15, Adrien R. wrote: > Colin Law wrote in post #1157627: >> Sorry, I meant Player of course. >> > > Here it is: > > class Player < ActiveRecord::Base > belongs_to :game > has_many :cards, as: :cardable What happens if you say puts @game.players.inspect Colin -- You

[Rails] Re: Re: Re: void value expression on model

2014-09-15 Thread Adrien R.
Colin Law wrote in post #1157627: > Sorry, I meant Player of course. > Here it is: class Player < ActiveRecord::Base belongs_to :game has_many :cards, as: :cardable -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Rails 4: generic route

2014-09-15 Thread Paolo Di Pietro
Hi all, I'd like to implement (Rails 4) a very high level (generic) abstract controller, able to manage any route and then create a viewer on the fly. I'd like to call it 'abstracts', and being able to call as :abstract(/:subject(/:action(/:id))) something like abstract/user/create or abs

[Rails] Re: My First Project Help

2014-09-15 Thread Mohammed Rashid
Ok so the main aim is to allow music directors to share info with members, this info includes rota, song list and a calender to click dates when they aren't going to be free. This requires a log in access. I will have to produce 3 pages I will describe what an ADMIN will be able to do on it:

Re: [Rails] Implementing match-making with Ruby on Rails

2014-09-15 Thread Jason Fleetwood-Boldt
On Sep 14, 2014, at 1:35 AM, Joe Crotchett wrote: > I'm using Ruby on Rails to build a real-time game web app. When a player > taps "Play Now", I want to match them up with another player that is > looking for a game (match-making). With my basic understanding of RoR, > one immediate way I think

Re: [Rails] pushing a local repository to github

2014-09-15 Thread Jason Fleetwood-Boldt
Cristiano, Technically your post is off-topic since it is not related to Rails, but check out this resource which I highly recommend for you to learn git: http://gitready.com -Jason On Sep 13, 2014, at 10:15 PM, Cristiano D. wrote: > i got it! > > using git pull > > -- > Posted vi

Re: [Rails] My First Project Help

2014-09-15 Thread Ganesh Ranganathan
On Mon, Sep 15, 2014 at 2:42 PM, Mohammed Rashid wrote: > I just need somebody to point me in the right direction on how to start > off. I have so far got experience on creating todo lists, user > authentication and jumping into a real life project which is a big > moment for me. I am given a tas

Re: [Rails] My First Project Help

2014-09-15 Thread Colin Law
On 15 September 2014 10:12, Mohammed Rashid wrote: > I just need somebody to point me in the right direction on how to start > off. I have so far got experience on creating todo lists, user > authentication and jumping into a real life project which is a big > moment for me. I am given a task to c

[Rails] My First Project Help

2014-09-15 Thread Mohammed Rashid
I just need somebody to point me in the right direction on how to start off. I have so far got experience on creating todo lists, user authentication and jumping into a real life project which is a big moment for me. I am given a task to create: a planner which allows people to share information w