[Rails] Volatile cache keys with Rails and Redis

2012-11-02 Thread bricker
Does Rails automatically set an EXPIRE attribute on keys when working with Redis, or will an old key sit there forever if it's never manually cleared out? This is mostly a concern when using ActiveModel's "cache_key": <%= cache @post do %> The cache-key will be something like views/posts/744-20

[Rails] Re: jquery error in production precompiled

2012-11-02 Thread D2M
yes, I have. Jquery error : it is work in front end ( user view ). admin view (back end - setting ). some jquery work. sometime jquery not work. On Friday, November 2, 2012 6:26:26 PM UTC+6:30, Nikhil Dashore wrote: > > Have you included 'jquery_rails' in your gem file? > > Nikhil > > On Friday,

[Rails] ids writer fields for HABTM relationship.

2012-11-02 Thread Pierre M.
Hello forum readers, Let's say i have two models: Person and Role (i replicated the problem with Post & Tag as well, as i thought the problem was linked to some application-specific rights problem, but it wasn't). In Person, attr_accessible role_ids is declared, so it accepts an array of Role ids

[Rails] Is this a use case for an engine or a railtie and why/how?

2012-11-02 Thread Frank Mattia
I have the following files and would like to somehow package them together in a gem however I'm unsure of what I need to create. An engine, a railtie, or something completely different? /lib/unit.rb A unit class to handle a common requirement across my models /app/concerns/unitify_concern.rb

Re: [Rails] Good Tutorial on RSpec

2012-11-02 Thread scrapcode
I'm with this guy. http://ruby.railstutorial.org is focused on rspec the whole way through it to the point that it's annoying. On Friday, November 2, 2012 11:05:46 AM UTC-4, Evan Misshula wrote: > > The only way I got a clue was > http://pragprog.com/book/achbd/the-rspec-book for a tutorial with

[Rails] custom validation method on nested model

2012-11-02 Thread Benny
I can't get the field_with_errors div's to wrap around nested fields in a fields_for block when using a custom validation method in the parent model. e.g. there needs to be at least one order detail record associated with an order. I add the error to the parent model errors hash however I can't

[Rails] Re: Newbie - deployment, hosting

2012-11-02 Thread scrapcode
Try Heroku out first, since it's free for a small app. You can push to it straight from git, and this tutorial shows you step by step how to set it up right from the beginning: http://ruby.railstutorial.org On Monday, October 29, 2012 9:32:41 AM UTC-4, yaniv pr wrote: > > Hello, > > So, after l

Re: [Rails] Good Tutorial on RSpec

2012-11-02 Thread Jean Barmash
I like the code school class, it's a combination of short videos and exercises to reinforce the learning. They have one on rails testing in general and one on rspec specifically. www.codeschool.com. Thanks, Jean Jean Barmash Co-Founder & Organizer, CTOSchool.org, an NYC meetup for startup te

[Rails] Adding associations without commiting to database

2012-11-02 Thread Jan Brdo
I think there is a slight inconsistency in Rails regarding adding associations between existing records. Assume Post has_many :tags. We have an analogy when we want to immediately add the association to either new or existing child: > Post.first.tags.create name: "my tag" # commits immediately

Re: [Rails] Good Tutorial on RSpec

2012-11-02 Thread Иван Бишевац
I took first offering of SaaS and it's great, there is a lot of use of RSpec and other TDD techniques. On Monday starts advanced course of SaaS. Look at https://www.edx.org/courses/BerkeleyX/CS169.2x/2012_Fall/about 2012/11/2 Raul Sanchez > You can sign up a coursera course named saas > > It ha

Re: [Rails] Good Tutorial on RSpec

2012-11-02 Thread Raul Sanchez
You can sign up a coursera course named saas It has an advanced course in mitx. I did it and i like a lot Raul El 02/11/2012 16:05, "Evan Misshula" escribió: > The only way I got a clue was > http://pragprog.com/book/achbd/the-rspec-book for a tutorial with RSPEC > check out www.railstutorial.

[Rails] Re: Any plugin available to support rhtml and rxml in rails 3.x

2012-11-02 Thread Matt Jones
On Thursday, 1 November 2012 06:34:22 UTC-4, Ruby-Forum.com User wrote: > > Any plugin available to support rxml or rhtml files in Rails 3.x. > > Not that I've heard of - if you've still got files with those extensions, rename them. (.rhtml becomes .html.erb, .rxml becomes .xml.builder) I susp

Re: [Rails] Good Tutorial on RSpec

2012-11-02 Thread Evan Misshula
The only way I got a clue was http://pragprog.com/book/achbd/the-rspec-bookfor a tutorial with RSPEC check out www.railstutorial.org On Fri, Nov 2, 2012 at 11:00 AM, Adnan wrote: > Hey, > > Suggest me good resources about RSpec. Don't tell me to search in Google. > Trust me I did lot!! > > Thank

[Rails] Good Tutorial on RSpec

2012-11-02 Thread Adnan
Hey, Suggest me good resources about RSpec. Don't tell me to search in Google. Trust me I did lot!! Thanks -- 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 unsu

[Rails] Re: How can i send email with ruby on rails 3.1 ?

2012-11-02 Thread Dharmendra S.
gvhghgfhfghfghfhg Attachments: http://www.ruby-forum.com/attachment/7849/bbbappyjpg12.jpg -- 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-t

Re: [Rails] Re: Newbie - deployment, hosting

2012-11-02 Thread Alessio Peternelli
You are right im sorry i wasn't clear, i was not comparing them, i was "grouping" them meaning they are both hosting solutions. About hosting, to me seems that he want to learn before going big, so i believe it's better to begin with a cheap and easy solution with the objective of learning some

[Rails] redirect_to for Nginx Reverse Proxy?

2012-11-02 Thread The Chromag
I'm trying to figure out the best way to do this. I'm working on a web application where the entire thing requires the user to be logged in. I use a before_filter in all the controllers to check for the logged in session variable. If it doesn't exist, I redirect to the "login" controller and the

[Rails] Re: jquery error in production precompiled

2012-11-02 Thread Nikhil Dashore
Have you included 'jquery_rails' in your gem file? Nikhil On Friday, November 2, 2012 3:57:50 PM UTC+5:30, D2M wrote: > > In my rails project, for production precompile > I do : rake assets:precompile RAILS_ENV=production > > But it not work for jquery. > In my firegub console, I got the error >

[Rails] Re: Newbie - deployment, hosting

2012-11-02 Thread yaniv pr
Thanks a lot for your detailed answers, I'm starting to get the picture On Friday, November 2, 2012 11:13:35 AM UTC+2, Alessio Peternelli wrote: > > I use to host on * > > http://www.webfaction.com/services/hosting?affiliate=apeternelli they have > good support team, low prices and a well balance

Re: [Rails] Re: Newbie - deployment, hosting

2012-11-02 Thread Jordon Bedwell
On Fri, Nov 2, 2012 at 4:13 AM, Alessio Peternelli wrote: > - Engine Yard and Amazon Ec2 are Clud Hostings, Amazon EC2 is better but > complex, EY is expensive. EngineYard uses EC2 so I don't see what the difference could be? Unless you are comparing a PaaS with a IaaS which is flawed from the ge

[Rails] Re: how to use localtunnel gem ?

2012-11-02 Thread Osledy Bazó
Yes, you have to start the app on another terminal. I use localtunnel to show my coworkers the work im doing (i work remotely, and dont have static ip) El jueves, 1 de noviembre de 2012 07:22:07 UTC-4:30, Fahim Patel escribió: > > > Hi all, > > I read about localtunnel gem . As per my knowledge ,

[Rails] jquery error in production precompiled

2012-11-02 Thread D2M
In my rails project, for production precompile I do : rake assets:precompile RAILS_ENV=production But it not work for jquery. In my firegub console, I got the error “ReferenceError: JQuery is not defined “ at production.rb # Disable Rails's static asset server (Apache or nginx will already do t

[Rails] Re: Newbie - deployment, hosting

2012-11-02 Thread Alessio Peternelli
I use to host on * http://www.webfaction.com/services/hosting?affiliate=apeternelli they have good support team, low prices and a well balance between easy-to-use and do-everything-you-want. * * * * By the way : * * - Engine Yard and Amazon Ec2 are Clud Hostings, Amazon EC2 is better but

Re: [Rails] How to run controller methods using rails runner ?

2012-11-02 Thread Fahim Patel
Thanks for reply. Regards Fahim Babar Patel On Friday, November 2, 2012 1:37:44 PM UTC+5:30, Colin Law wrote: > > On 1 November 2012 06:04, Fahim Patel > > wrote: > > > > Hi all, > > > > I have run my controller methods from console, but now i learn about > rails > > runner . > > > > i e

Re: [Rails] Re: Problem passing id of parent model to child

2012-11-02 Thread Colin Law
On 1 November 2012 23:32, why-el wrote: > Yes that's what I get as a path. I have solved this issue. Its silly really, > it turns out I needed to make an @organization instance available throughout > my projectsController, so I made a before filter to fetch it based on the > url. As a beginner I

[Rails] Re: [Rails 3.2.8] issue in regex scan

2012-11-02 Thread Erwin
sorry .. found the 'bug' .. typing error should be 'sites' in the regex ... sacnning fine now ... Le vendredi 2 novembre 2012 09:24:43 UTC+1, Erwin a écrit : > > running a scan in irb is fine : > > 1.9.3p194 :001 > request_url = > "http://lvh.me::3000/en/backoffice/cms-admin/site/6/pages"; >

[Rails] [Rails 3.2.8] issue in regex scan

2012-11-02 Thread Erwin
running a scan in irb is fine : 1.9.3p194 :001 > request_url = "http://lvh.me::3000/en/backoffice/cms-admin/site/6/pages"; => "http://lvh.me::3000/en/backoffice/cms-admin/site/6/pages"; request_url.scan(/^([\S]+)(backoffice\/cms-admin\/site\/)(\d+)(\/pages)$/)[0][2] => "6" however running i

Re: [Rails] How to run controller methods using rails runner ?

2012-11-02 Thread Colin Law
On 1 November 2012 06:04, Fahim Patel wrote: > > Hi all, > > I have run my controller methods from console, but now i learn about rails > runner . > > i execute model method successful , but i wish to run my controller method > using rails runner. > > Q Is this possible to run controller method f

Re: [Rails] Re: Newbie - deployment, hosting

2012-11-02 Thread Jordon Bedwell
On Fri, Nov 2, 2012 at 1:39 AM, Adnan wrote: > How about Appfog?? Maybe once they learn that MySQL is not as cool as they want it to be, I understand we can choose Postgres after the fact but having an unbound MySQL instance on my app would get pretty annoying since I like concise and not clutter