[Rails] Re: Cannot install Rails

2014-09-16 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-16 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

[Rails] $ rails --version : Output checking

2014-09-16 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

[Rails] Logic duplication in scopes predicates

2014-09-16 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

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

2014-09-16 Thread Colin Law
On 15 September 2014 22:56, Adrien R. li...@ruby-forum.com wrote: Colin Law wrote in post #1157676: On 15 September 2014 21:15, Adrien R. li...@ruby-forum.com wrote: Colin Law wrote in post #1157627: Sorry, I meant Player of course. Here it is: class Player ActiveRecord::Base

[Rails] Re: Use Carrierwave with Active Admin?

2014-09-16 Thread Heinz Strunk
The current versions work for me. Example: form :html = {:multipart = true} do |f| f.inputs Blog do f.input :blog, :as = :select f.input :video_link f.input :image, :as = :file, :hint = f.template.image_tag(f.object.image.url(:thumb)) f.input :image_cache, :as =

Re: [Rails] Logic duplication in scopes predicates

2014-09-16 Thread Vivek Sampara
scope :recommended, - { where(recommended_condition) } def recommended? eval(recommended_condition(||)) end def recommended_condition(selector = OR) editors_selection #{selector} rating 9 end On Tue, Sep 16, 2014 at 7:33 AM, f...@excursiopedia.com wrote: Consider something like that in

Re: [Rails] Logic duplication in scopes predicates

2014-09-16 Thread Vivek Sampara
tiny update - scope :recommended, - { where(self.recommended_condition) } def recommended? eval(self.class.recommended_condition(||)) end def self.recommended_condition(selector == OR) 'editors_selection #{selector} rating 9' end On Tue, Sep 16, 2014 at 1:33 PM, Vivek Sampara

Re: [Rails] $ rails --version : Output checking

2014-09-16 Thread Vivek Sampara
Its working fine. Just a depreciated warning. read this for more info http://stackoverflow.com/questions/15590450/ruby-2-0-0p0-irb-error-dl-is-deprecated-please-use-fiddle On Tue, Sep 16, 2014 at 8:29 AM, Rohan Sarker rohansarke...@gmail.com wrote: I had a query and thank you for helping me in

Re: [Rails] Ruby / Rails Developer - Contract Opportunity

2014-09-16 Thread M,Gopi M.gopinath
Hi, Please find my updated cv. Best Regards, *Gopinath M* Ruby on Rails Developer Contact : +91-9994652146 Skype Id : gopinath.murugan Email : gopi170...@gmail.com On Tue, Sep 16, 2014 at 1:37 AM, Gayle Steuckrath gayle.steuckr...@thecarreraagency.com wrote: We are seeking a Ruby

[Rails] Re: Rails 4: generic route

2014-09-16 Thread Jarmo Isotalo
Cant you do it already? On Monday, September 15, 2014 6:34:46 PM UTC+2, Paolo Di Pietro wrote: 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

[Rails] Re: void value expression on model

2014-09-16 Thread Matt Jones
On Tuesday, 2 September 2014 18:20:57 UTC-4, Ruby-Forum.com User wrote: Thank you Jason for your fast reply. I didn't know about the default logger, I have changed my code. Yes it is in a controller, in the create action: https://gist.github.com/anonymous/d138a4f2c76bb4b32dd2 The full

Re: [Rails] void value expression on model

2014-09-16 Thread Jason Fleetwood-Boldt
I really like my IDE which shows me syntax errors hi-lighted in red. Any good IDE (Sublime, Rubymine, etc) should do this for you and it's a good thing to adopt such a tool. On Sep 16, 2014, at 11:06 AM, Matt Jones al2o...@gmail.com wrote: On Tuesday, 2 September 2014 18:20:57 UTC-4,

[Rails] Learning Rails, how to walk through relations in template?

2014-09-16 Thread frocco
Hello, I have a products table that is related to category. category has many products. How do I query the products to also include the category? Once I do this, how to I show the category data in my template? Thanks -- You received this message because you are subscribed to the Google

Re: [Rails] Learning Rails, how to walk through relations in template?

2014-09-16 Thread Vivek Sampara
Please look into this http://apidock.com/rails/ActiveRecord/QueryMethods/includes On Tue, Sep 16, 2014 at 10:52 PM, frocco faro...@gmail.com wrote: Hello, I have a products table that is related to category. category has many products. How do I query the products to also include the

Re: [Rails] Learning Rails, how to walk through relations in template?

2014-09-16 Thread Jason Fleetwood-Boldt
As described here http://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations I think what you want is something like products = Product.includes(:category) This will eager load the category association when you load the Product objects. You must specify the inverse

Re: [Rails] Learning Rails, how to walk through relations in template?

2014-09-16 Thread frocco
Thank you, got it working. On Tuesday, September 16, 2014 1:27:27 PM UTC-4, Vivek Sampara wrote: Please look into this http://apidock.com/rails/ActiveRecord/QueryMethods/includes On Tue, Sep 16, 2014 at 10:52 PM, frocco far...@gmail.com javascript: wrote: Hello, I have a products

Re: [Rails] Learning Rails, how to walk through relations in template?

2014-09-16 Thread Colin Law
On 16 September 2014 18:22, frocco faro...@gmail.com wrote: Hello, I have a products table that is related to category. category has many products. How do I query the products to also include the category? Once I do this, how to I show the category data in my template? There is usually

[Rails] Re: void value expression on model

2014-09-16 Thread Adrien R.
Hello, Thank you very much everybody, this was as simple as you told: parse error in player.rb. I wasn't looking in the good direction at all and was confused by the fact it was thrown while accessing the attribute (and then initializing the class). -- Posted via http://www.ruby-forum.com/.

Re: [Rails] Moving an old rails app from windows 2003 server to windows 2008 server.

2014-09-16 Thread kimda
Hi Timothy, Thanks for your comment. I followed your instruction and it looks like I have pretty much everything installed in the old ruby/bin directory luckily. I didn't have to run rake gems:unpack command and I just copied ruby dir, the application directory, oracle client and set and set

Re: [Rails] Moving an old rails app from windows 2003 server to windows 2008 server.

2014-09-16 Thread Timothy Mukaibo
Hey Daniel, Glad to hear you got it working! Sounds like it wasn't so bad in the end. Ruby on Windows is always...interesting! Thanks, Timothy. On 17 September 2014 08:15, kimda tkk...@gmail.com wrote: Hi Timothy, Thanks for your comment. I followed your instruction and it looks like I

[Rails] Notification System(social-network-like)

2014-09-16 Thread Diego Dillenburg Bueno
Hey guys, I'm still kinda new to Rails and was wondering if someone have ever been through this situation in any project. What I want to implement is a notification system, for a personal project I'm working into, something like a social network like Facebook that sends notifications to given

Re: [Rails] Notification System(social-network-like)

2014-09-16 Thread Robby O'Connor
Diaspora is written in rails (http://github.com/diaspora) On Sep 16, 2014 9:21 PM, Diego Dillenburg Bueno diegodillenb...@gmail.com wrote: Hey guys, I'm still kinda new to Rails and was wondering if someone have ever been through this situation in any project. What I want to implement is a

Re: [Rails] Notification System(social-network-like)

2014-09-16 Thread Diego Dillenburg Bueno
Oh yeah, right! I had forgotten of 'em. Thank you very much. Diego Dillenbug Bueno 2014-09-16 22:22 GMT-03:00 Robby O'Connor robby.ocon...@gmail.com: Diaspora is written in rails (http://github.com/diaspora) On Sep 16, 2014 9:21 PM, Diego Dillenburg Bueno diegodillenb...@gmail.com wrote: