[Rails] Reading/writing cookies via a middleware in Rails 4.0

2015-08-17 Thread powi
In my Rails 3.2 setup I had the following middleware: module Rack class Locale def initialize(app) @app = app end def call(env) request = Rack::Request.new(env) params = request.params cookies = request.env['action_dispatch.cookies'] session = request.

[Rails] Getting ActionController::UrlGenerationError in controller test after upgrade from 3.2.22 to 4.0.13

2015-08-06 Thread powi
Hello. While on 3.2 I had a controller spec which was calling an action: # ... get :show # ... The route was this: guides_show GET /guides/:id(.:name.html)(.:format) guides#show {:id=>/\d+/

[Rails] Re: [Feature idea] Truncating timestamp precision

2014-10-06 Thread powi
sion) { |amount| > puts amount > } > end > => # > DateTime.now.truncate_precision(sec: 10) > {:sec=>10} > => nil > > > On Monday, October 6, 2014 8:17:58 AM UTC-4, powi wrote: >> >> Hello. >> >> I thought of adding a method in Ac

[Rails] [Feature idea] Truncating timestamp precision

2014-10-06 Thread powi
Hello. I thought of adding a method in ActiveSupport that would be able to truncate custom precision amounts from a `DateTime` object. For example: DateTime.now.truncate_precision(sec: 10) # => a new DateTime object minus the specified precision I've needed this in a feature of mine and t

[Rails] Re: Future of Rails technologies

2013-03-18 Thread powi
I can tell you about the past of rails if you want. On Friday, 15 March 2013 12:18:05 UTC+2, Ruby-Forum.com User wrote: > > Hi all can you tell me about future of ruby on rails Technolgy > > Regards > Lekha Pillai > > -- > Posted via http://www.ruby-forum.com/. > -- You received this messag

[Rails] Re: rails server doesn't work properly

2013-03-18 Thread powi
Forgot! These are my .bash_profile & .profile files (I'm on Mountain Lion): http://pastie.org/6603536 -- 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, send an email to rub

[Rails] rails server doesn't work properly

2013-03-18 Thread powi
Everything was ok, until suddenly when I do a "rails server", I get this output: http://pastie.org/6603101. This happened also on some applications before, suddenly. I'm using *RVM* and I'm inside the apps root folder. I'm also using* Rails edge*. $ ruby -v => ruby 2.0.0p0 (2013-02-24 revision

Re: [Rails] ActiveRecord::Base.default_scopes?

2013-03-12 Thread powi
w wrote: > > On 11 March 2013 21:26, powi > wrote: > > It's not documented since it's dynamically defined. > > Many dynamically defined methods are documented in various places (in > the Rails Guides for example). > If it is not documented how am I supposed

Re: [Rails] ActiveRecord::Base.default_scopes?

2013-03-11 Thread powi
It's not documented since it's dynamically defined. On Monday, 11 March 2013 12:14:02 UTC+2, Colin Law wrote: > > On 11 March 2013 07:30, powi > wrote: > > ActiveRecord models has a weird behavior. > > > > class Post < ActiveRecord::Base > >

[Rails] ActiveRecord::Base.default_scopes?

2013-03-11 Thread powi
ActiveRecord models has a weird behavior. class Post < ActiveRecord::Base end % Post.default_scopes? # => true This happens because Post.default_scopes returns an empty array and .default_scopes? calls !![] which is true. But this can be confusing, don't you think? -- You received this messa

[Rails] Ideas for a ruby gem

2012-10-02 Thread powi
Hello. I want to make a gem, but I don't know what would that be. Do you have any ideas a mind? Could be anything. :) -- 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.co

Re: [Rails] Ruby on Rails salaries in Berlin?

2012-09-25 Thread powi
Ah, forget my previous post, around ~1,5k will go to paying the bills, food etc. so it's about 1k staying in your pocket for entertainment or anything else that's not a required expense. On Tuesday, 25 September 2012 18:48:46 UTC+3, powi wrote: > > Hi Werner, thanks for your

Re: [Rails] Ruby on Rails salaries in Berlin?

2012-09-25 Thread powi
Hi Werner, thanks for your helpful answers! When you say 30k, you mean after paying bills (house, food etc), right? On Tuesday, 25 September 2012 17:39:20 UTC+3, Werner Laude wrote: > > > Am 25.09.2012 um 15:35 schrieb powi >: > > Santiago.. > > Hi Werner. > >

[Rails] Re: Ruby on Rails salaries in Berlin?

2012-09-25 Thread powi
ut learning fast and built some quite good things till now). Also, what would you estimate the life there costs? I mean, the bills (house, electricity, water, food, internet/phone)? Also, I heard the taxes there are quite high, something like 45%? On Monday, 24 September 2012 21:17:02 UTC+3, powi

[Rails] Ruby on Rails salaries in Berlin?

2012-09-24 Thread powi
Hello all. I'm living in Spain, and I'm offered a job in a Berlin IT company as a Rails developer. I'm considered a junior developer (almost 1 year experience) but I think I'm pretty good for this time. I would like to ask what would be considered a good salary for such a position. I mean, wh