Re: [Rails] Re: Is it possible to make attachment_fu to use :file_system for storage during tests?

2013-03-08 Thread tamouse mailing lists
On Fri, Mar 8, 2013 at 10:24 PM, Roman Mirk wrote: > Could you please be more specific or provide an example if possible? Read up on rspec mocks in the RSpec book, and there are several examples around the net. -- You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Re: Is it possible to make attachment_fu to use :file_system for storage during tests?

2013-03-08 Thread Roman Mirk
Could you please be more specific or provide an example if possible? Thanks -- 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 unsubscribe from this group and stop receiving emails from it, sen

Re: [Rails] Is it possible to make attachment_fu upload to use :file_system for storage during tests?

2013-03-08 Thread tamouse mailing lists
On Fri, Mar 8, 2013 at 7:54 PM, Arman Mirk wrote: > I'm using Attachment_fu for a model that has 3 attachment fields with s3 > for storage. > > Unit testing this model is very slow. This made me think if there is a > way to switch between storage types during testing and > development/production?

[Rails] Is it possible to make attachment_fu upload to use :file_system for storage during tests?

2013-03-08 Thread Arman Mirk
I'm using Attachment_fu for a model that has 3 attachment fields with s3 for storage. Unit testing this model is very slow. This made me think if there is a way to switch between storage types during testing and development/production? -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] [JOBS] Ruby on Rails with Amazon Redshift development

2013-03-08 Thread reena a.
Individual freelancer working remotely preferred. No companies or agencies please. Seasoned Ruby on Rails Developer with extensive experience with Postgres database and external API, REST, JSON and XML sought to work on an emerging large scale data project using Amazon Redshift as the database pla

[Rails] Rails engines question

2013-03-08 Thread Damjan Rems
I would like to use my own directory named forms inside my own engine. I know I can add it to loading paths like this in application.rb module MyAPP class Application < Rails::Application config.paths["forms"] = Rails.root.join('vendor/myapp/forms') end end or inside and can access it insi

[Rails] Ruby on Rails Deeloper at REDMOND, WA

2013-03-08 Thread Rakesh L.
Position: RUBY ON RAILS Location: REDMOND, WA This position will be focused on being the Development and Technical Lead for a key component of the overall API Platform. The person in this role will have the following responsibilities: - Leading a team of developers in the development and delivery

Re: [Rails] Re: A NJ/NYC based RoR developer

2013-03-08 Thread Alexandre Calvão
Try linkedin. Facebook it is also a great option for hiring developer. http://www.facebook.com/groups/2211785751/ But, for what I can say, it would be very difficult to hire someone with this specifications. The professionals here prefer remote jobs. === *Alexandre Mondaini Cal

[Rails] Re: Filter via has_many, but show all has_many objects in result

2013-03-08 Thread Frederick Cheung
On Thursday, March 7, 2013 9:34:17 PM UTC, dcec...@gmail.com wrote: > > I have a model, resource, which has_many categories: > > has_many :category_resources, :dependent => :destroy > has_many :categories, :through => :category_resources > > I have it setup to filter on categories, for a

Re: [Rails] Filter params with strong parameters

2013-03-08 Thread Linus Pettersson
Thank you. I thought strong params needed symbols. Cheers, Linus Den fredagen den 8:e mars 2013 kl. 10:35:13 UTC+1 skrev Jordon Bedwell: > > On Fri, Mar 8, 2013 at 3:27 AM, Linus Pettersson > > wrote: > > Hi > > > > I have an hstore field in my database where I store a lot of different > >

[Rails] Re: Filter params with strong parameters

2013-03-08 Thread Linus Pettersson
Got it myself! Splat operator to the rescue :) params.require(:foo).permit(*Foo::DOCUMENT_FIELDS.map(&:to_sym)) Den fredagen den 8:e mars 2013 kl. 10:27:50 UTC+1 skrev Linus Pettersson: > > Hi > > I have an hstore field in my database where I store a lot of different > fields. > > I still wan

Re: [Rails] Filter params with strong parameters

2013-03-08 Thread Jordon Bedwell
On Fri, Mar 8, 2013 at 3:35 AM, Jordon Bedwell wrote: > `params.require(:foo).permit(*Foo::DOCUMENT_FIELDS.map(&:to_sym))` > Though if I'm honest I probably would expect you to not take the long > trip with map and to_sym, might as well just leave them as string keys > because params has indiffere

Re: [Rails] Filter params with strong parameters

2013-03-08 Thread Jordon Bedwell
On Fri, Mar 8, 2013 at 3:27 AM, Linus Pettersson wrote: > Hi > > I have an hstore field in my database where I store a lot of different > fields. > > I still want getters, setters and validations for my fields so I've created > an array with the fields like this: > > DOCUMENT_FIELDS = %w[foo bar b

[Rails] Filter params with strong parameters

2013-03-08 Thread Linus Pettersson
Hi I have an hstore field in my database where I store a lot of different fields. I still want getters, setters and validations for my fields so I've created an array with the fields like this: DOCUMENT_FIELDS = %w[foo bar baz] Then I do some meta programming to create getters and setters:

Re: [Rails] Filter via has_many, but show all has_many objects in result

2013-03-08 Thread Colin Law
On 7 March 2013 21:34, wrote: > I have a model, resource, which has_many categories: > > has_many :category_resources, :dependent => :destroy > has_many :categories, :through => :category_resources > > I have it setup to filter on categories, for a list view: > records = > Resource.includ