Re: [Rails] How to enable activerecord whitelist_attributes in non-Rails environment?

2012-08-16 Thread Jordon Bedwell
On Wednesday, 15 August 2012 05:04:44 UTC-5, femto wrote: Hello all, I'm developing a sinatra application and loads ActiveRecord in, sometimes it will just report warning for mass for attributes, how can I enable it in non-Rails environment? checked in rails code, it's

Re: [Rails] Re: Junior Rails developer looking for remote work.

2012-08-16 Thread Jordon Bedwell
Hi, On 08/13/2012 09:11 AM, Gintautas Šimkus wrote: Oh, well then you should look into behavior / test driven development and testing (for JS) tools similar to http://pivotal.github.com/jasmine/ Also you must learn CoffeeScript as it comes bundled with Rails (also it is very good ;), Next

Re: [Rails] Rails session ID

2012-08-16 Thread Jordon Bedwell
On 08/14/2012 09:59 AM, Tim Slattery wrote: I'm trying to retrieve the session ID in rails. I found a web page that said to use session.session_id But when I do that, I get: undefined method `session_id' for #Rack::Session::Abstract::SessionHash:0x2e14c5 What do I need to do?

Re: [Rails] Commands of creating new app. are different.

2012-08-20 Thread Jordon Bedwell
On Sat, Aug 18, 2012 at 12:56 PM, Rubyist Rohit li...@ruby-forum.com wrote: I am following Head First Rails to learn Rails Web Application Development. To create a new web application from command prompt, the books says: rails app_name When I try the above command, it doesn't work. After

Re: [Rails] Add an Expires Header

2012-08-22 Thread Jordon Bedwell
On Tue, Aug 21, 2012 at 7:38 AM, Saravanan P saravana...@shriramits.com wrote: Hello everyone In rails how can add an expires header. In which file i need write expires year code? Please advice. response.headers['Expires'] = CGI.rfc1123_date(10.days.from_now) -- You received this message

[Rails] Re: Rails test environment can't find capybara methods

2012-08-25 Thread Jordon Bedwell
On Friday, 24 August 2012 09:33:10 UTC-5, Ruby-Forum.com User wrote: I'm trying to include capybara into my RSpec integration tests. It seems to work fine with the Cucumber environment but for some reason it's giving me issues with the Test environment. Here are the steps I've followed:

Re: [Rails] Re: ActiveRecord storing arrays and hashes

2012-08-25 Thread Jordon Bedwell
On Friday, 24 August 2012 06:12:02 UTC-5, Azhaguselvan SP wrote: Oops yeah. I was checking this within a rails console without reloading it. After reloading, the attribute just returns a yaml string. It also exists so we can build custom serializers, for example I have several fields

Re: [Rails] Where to store functions

2012-08-25 Thread Jordon Bedwell
On Saturday, 25 August 2012 12:44:00 UTC-5, Michael Pavling wrote: On 25 August 2012 18:40, Dave Castellano li...@ruby-forum.comjavascript: wrote: Generated questions are generated by a method I write. When a generated question is picked, the method I wrote is called and it returns

[Rails] RedCarpet or alternative that can parse just *- and \s{4}

2012-08-30 Thread Jordon Bedwell
I was wondering if anybody had any idea if Redcarpet can be convinced easily to only parse code, paragraphs bold and italic or if there was an alternate gem that is just as fast that can be controlled to only allow selective parsing. I've been reading the docs all night and cannot find any

[Rails] Re: how to change theme in rails 3.2.7

2012-08-30 Thread Jordon Bedwell
On Thursday, 30 August 2012 05:13:57 UTC-5, Ruby-Forum.com User wrote: I'm using rails 3.2.7. I have few themes in my public/themes folder. For example in my theme-1 folder there is one index.html + style.css + few images (if required) At the time of registration user will

[Rails] Re: how to change theme in rails 3.2.7

2012-08-30 Thread Jordon Bedwell
On Thursday, 30 August 2012 05:26:14 UTC-5, Ruby-Forum.com User wrote: Jordon Bedwell wrote in post #1073894: On Thursday, 30 August 2012 05:13:57 UTC-5, Ruby-Forum.com User wrote: end Right now when user login he will redirect to index method and index.html.erb

Re: [Rails] Is it a good idea for me to learn Ruby on Rails?

2012-08-30 Thread Jordon Bedwell
On Thursday, 30 August 2012 07:41:13 UTC-5, Dheeraj Kumar wrote: Make sure whatever you learn finally, use MongoDB with it. It is web scale. Because added complexity on already complex apps means more performance. Because using a pure Ruby wrapper is faster than C. Because you can't cluster PG

[Rails] Re: Extracting information out of a database column

2012-08-31 Thread Jordon Bedwell
On Friday, 31 August 2012 01:42:10 UTC-5, Ruby-Forum.com User wrote: Hi All, I'm new to rails and am trying to tackle a problem that I can't seem to find the right solution for. I have an existing database that im building a rails app on top of. One of my columns 'message' is a long

[Rails] Re: Paginate an array

2012-08-31 Thread Jordon Bedwell
On Wednesday, 29 August 2012 08:07:18 UTC-5, Ruby-Forum.com User wrote: My controller code is as follows, def index end def show if params[:cat_id] # cat_id is fetched from DB(a table with two columns id and name) #mapped as cat_id in routes file

Re: [Rails] Question1 Cucumber Rails

2012-08-31 Thread Jordon Bedwell
On Fri, Aug 31, 2012 at 8:59 AM, Fahim Patel pafa...@gmail.com wrote: can we write multiple background in one feature file? No. can we write multiple feature in one feature file.? Yes. Read: http://pragprog.com/book/hwcuc/the-cucumber-book -- You received this message because you

[Rails] Re: Question1 Cucumber Rails

2012-08-31 Thread Jordon Bedwell
On Friday, 31 August 2012 08:59:48 UTC-5, Fahim Patel wrote: can we write multiple background in one feature file? No. can we write multiple feature in one feature file.? Yes. Read: http://pragprog.com/book/hwcuc/the-cucumber-book -- You received this message because you are

[Rails] Re: hii friends,,,,,i m new to rails......i think there is a problem in destroy command .

2012-08-31 Thread Jordon Bedwell
On Friday, 31 August 2012 09:03:40 UTC-5, Fahim Patel wrote: can one explain this issue? On Thursday, August 16, 2012 10:33:47 AM UTC+5:30, Fahim Patel wrote: let me explain this problem ---rails destroythis command destroy

[Rails] Re: Adding functionality to an app in modular fashion?

2012-09-02 Thread Jordon Bedwell
On Sunday, 2 September 2012 18:43:23 UTC-5, jmcguckin wrote: Building a Rails app entails creating files in multiple locations. Config dir, App, Views, Layouts, etc. If I have an existing application app framework, is there a way to add a new feature (for example, contracts management)

Re: [Rails] Rails Generate Devise::session controller

2012-09-04 Thread Jordon Bedwell
On Tue, Sep 4, 2012 at 2:12 AM, Ashokkumar Yuvarajan ashokku...@shriramits.com wrote: Hi, I created session::controller as u said and also used routes like devise_for :users, :controllers = { :sessions = users/sessions } But i got an error Routing Error uninitialized constant Users

[Rails] Re: Re: Write to tempfile

2012-09-04 Thread Jordon Bedwell
On Tuesday, 4 September 2012 06:27:52 UTC-5, Ruby-Forum.com User wrote: Yes, I'm learning to program on my own... I don't believe anyone would pay for my work :-) Thanks, you were right - it is writing to the file and I can see it after closing. Can I follow with one last question...

Re: [Rails] dash symbol

2012-09-08 Thread Jordon Bedwell
In ruby a minus on an array removes elements. So its removing elements from the array. On Sep 8, 2012 1:42 PM, John Merlino stoici...@aol.com wrote: In the example below, what is the dash doing between the class attribute and array: (field_helpers - [:label, :check_box, :radio_button,

Re: [Rails] Re: flash[:notice] not working

2012-09-10 Thread Jordon Bedwell
On Mon, Sep 10, 2012 at 5:34 AM, Manoj M. li...@ruby-forum.com wrote: Loganathan S. wrote in post #1075308: Paste your code... Sent from Samsung Mobile. Hi, here is my code below, @user is saved successfully but not flash doesnot works. I have wrote this in userscontroller if

Re: [Rails] Object Efficiency

2012-09-10 Thread Jordon Bedwell
On Mon, Sep 10, 2012 at 11:59 AM, Derek Lin derek...@hotmail.com wrote: Just want to know the best practices to make sure I get off on the right foot. I think on a general rule, creating fewer instances of an object is ideal for performance right? (I am not suffering any real problems yet)

Re: [Rails] Passing Session id to rest client

2012-09-14 Thread Jordon Bedwell
On Fri, Sep 14, 2012 at 4:12 AM, Avi aavinash.beh...@gmail.com wrote: Hello, How can I pass session id through my rails application to a rest client through HTTParty or RestClient? I would consider this a security problem, and a major one at that but whatever who am I judge your bad security.

Re: [Rails] (JOB) Looking for RoR Engineer

2012-09-14 Thread Jordon Bedwell
On Fri, Sep 14, 2012 at 12:43 PM, Dave Aronson googlegroups2d...@davearonson.com wrote: On Fri, Sep 14, 2012 at 6:21 AM, Peter Hickman peterhickman...@googlemail.com wrote: And this is why people complain about job ad on this list! No location (I will not relocate to Greece for this job)

Re: [Rails] Array value to get except first two values

2012-09-15 Thread Jordon Bedwell
On Sat, Sep 15, 2012 at 9:33 AM, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Sat, Sep 15, 2012 at 3:21 AM, Maddy ashokku...@shriramits.com wrote: In an array value i need to find except first two values, example: [1,2,3,4,5,6,7,8 ] in that i need to get values except [1,2]. How

Re: [Rails] gem file showing outdated gems?

2012-09-17 Thread Jordon Bedwell
On Mon, Sep 17, 2012 at 2:44 PM, wragen22 bradwr...@gmail.com wrote: For some reason my gem file in my rails app shows outdated versions of gems even though i've updated. Ie. gem 'uglifier', '= 1.0.3' However after running bundle update my terminal showed Using uglifier (1.3.0) Is there

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-01 Thread Jordon Bedwell
On Mon, Oct 1, 2012 at 9:00 AM, Mandeep Kaur meghasi...@gmail.com wrote: On Sun, Sep 30, 2012 at 4:13 AM, Norbert Melzer timmel...@gmail.com wrote: Hint 7: Last but not least: Learn to use a deploy-tool like Capistrano or Vlad, it will make many things easier and do things automatically that I

Re: [Rails] Rails API Doc for Mail::Message?

2012-10-06 Thread Jordon Bedwell
That really depends on the library (gem) you used, the method you store it as and most importantly where you stored it at. Since it's not a system account (I'm assuming) it's not going to store it in system mail unless the gem is absolutely ignorant so you would have had to of told it where and

Re: [Rails] cancan

2012-10-08 Thread Jordon Bedwell
On Mon, Oct 8, 2012 at 6:59 AM, Walter Lee Davis wa...@wdstudio.com wrote: By dealing with the model that represents current_user or its local equivalent. The controller in question does not have to be the UsersController by any means, as long as you have authenticated at some point, and

Re: [Rails] Re: Problems setting gmail mail

2012-10-08 Thread Jordon Bedwell
I'm no Windows fan but On Mon, Oct 8, 2012 at 10:23 PM, Greg Donald gdon...@gmail.com wrote: Or use an OS that doesn't require participation in the Microsoft virus protection racket. Because Mac's don't have Malware protection, oh wait, Apple just doesn't tell you that they have internal

Re: [Rails] Re: Problems setting gmail mail

2012-10-08 Thread Jordon Bedwell
On Mon, Oct 8, 2012 at 11:25 PM, Greg Donald gdon...@gmail.com wrote: I never said anything about a Mac, but since you brought it up.. is that what you Dreamweaver programmers use these days? Yup, because clearly Dreamweaver is available on Linux in a native form. But a fail troll is fail,

Re: [Rails] Unablt to send mails in my server

2012-10-09 Thread Jordon Bedwell
On Tue, Oct 9, 2012 at 3:17 AM, keerthi priya emailtokeerthipr...@gmail.com wrote: hi all i am trying to setup mail option in my app. and when i am trying to send mails i got this error in my production log OpenSSL::SSL::SSLError (hostname was not match with the server certificate): __SNIP__

Re: [Rails] validates_format_of :email throws error

2012-10-10 Thread Jordon Bedwell
On Wed, Oct 10, 2012 at 8:59 AM, jude judear...@gmail.com wrote: class Person ActiveRecord::Base validates_format_of :email, :with = %r\A([^@\s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})\Z/, :on = :create end validates :email, :format = { :with = %r\A([^@\s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})\Z/, :on =

Re: [Rails] what;s the right url in this case

2012-10-11 Thread Jordon Bedwell
On Thu, Oct 11, 2012 at 6:23 AM, roelof rwob...@hotmail.com wrote: Hello, I have this models class Berichten ActiveRecord::Base attr_accessible :bericht, :user belongs_to :user belongs_to :Category end class User ActiveRecord::Base attr_accessible :email, :name has_many

Re: [Rails] Rails 3.2 what are the best gems for full-text search in sql db ?

2012-10-11 Thread Jordon Bedwell
On Thu, Oct 11, 2012 at 12:44 PM, Erwin yves_duf...@mac.com wrote: there are a lot of solutions , some gems requiring a separate server setup... I need to search for occurrences of some 'text in multiple columns ( :name; :email, :description, ..) https://github.com/Casecommons/pg_search

Re: [Rails] Which one is best for debugging (Pry or Ruby Debug) ?

2012-10-12 Thread Jordon Bedwell
Hi, On Fri, Oct 12, 2012 at 5:22 AM, Fahim Patel pafa...@gmail.com wrote: Let me know which one is best for debugging ? Pry is a cross-over REPL (IMO) that replaces IRB and not Ruby Debugger. I say it's cross-over because it supports some of what Ruby Debugger does with addons and sometimes

[Rails] Re: Rails 3.2 what are the best gems for full-text search in sql db ?

2012-10-12 Thread Jordon Bedwell
On Friday, 12 October 2012 09:12:45 UTC-5, Matt Jones wrote: Depending on what you're looking for, Sunspot may be useful - I've used it for a number of projects that needed full-text seach + filtering etc. There's a Railscast that should help you get started:

Re: [Rails] Which one is best for debugging (Pry or Ruby Debug) ?

2012-10-12 Thread Jordon Bedwell
On Friday, 12 October 2012 10:33:05 UTC-5, Fahim Patel wrote: As we use binding.pry , but we use same debugger in ruby debugger. And as per my knowledge debugger do same thing as binding.pry.If not than explain ? They do. But there is a distinction in that one's only goal is to debug,

Re: [Rails] Which one is best for debugging (Pry or Ruby Debug) ?

2012-10-12 Thread Jordon Bedwell
On Friday, 12 October 2012 10:55:58 UTC-5, Fahim Patel wrote: 1. Pry is a REPL 2. cross-over tool What this lines means. 1.) Read-eval-print loop, 2.) Stolen from car marketing (though I have no idea if it originates there), basically a cross-over was a mix between an SUV/Minivan and

Re: [Rails] Re: Rails 3.2 what are the best gems for full-text search in sql db ?

2012-10-12 Thread Jordon Bedwell
On Fri, Oct 12, 2012 at 4:40 PM, Hassan Schroeder hassan.schroe...@gmail.com wrote: What does that last sentence mean? Solr is FOSS. It means what it means. Obviously you think that Solr runs on Unicorn farts and not on servers, that or you think that servers are free. -- You received this

Re: [Rails] Temperature display

2012-10-13 Thread Jordon Bedwell
On Sat, Oct 13, 2012 at 7:22 AM, Maddy ashokku...@shriramits.com wrote: Is the possible to display current weather temperature ? Everything is possible if you know how to do it, first would be to find a weather API, Weather Channel is not so good (I don't even remember if they have an API),

Re: [Rails] Bundle Install

2012-10-16 Thread Jordon Bedwell
On Tue, Oct 16, 2012 at 7:47 AM, Colin Law clan...@googlemail.com wrote: sudo apt-get install openssl libssl-dev To add to what Colin said when I can't recognize a lib right off the bat I do something like: apt-cache search libssl |grep -- -dev then pick the one that is right apt-cache show

Re: [Rails] how to display the images in browser other than the storage path i.e.., public folder (ASAP)

2012-10-16 Thread Jordon Bedwell
On Tue, Oct 16, 2012 at 7:57 AM, Colin Law clan...@googlemail.com wrote: I don't use paperclip but my understanding that it is not normally possible to save outside of the public folder. Add the path to your assets: config.assets.paths.push(File.expand_path(~/my/path)) -- You received this

Re: [Rails] Bundle Install

2012-10-16 Thread Jordon Bedwell
On Tue, Oct 16, 2012 at 8:45 AM, Avi aavinash.beh...@gmail.com wrote: Yes, rvm is working fine. version - 1.16.13 I have added in .bashrc file also . But I don't know why I am getting this error. What is the output of ldconfig -p? You should see something like: ldconfig -p |grep libssl

Re: [Rails] Re: form tag is self-closing before input fields .. (HAML generator used)

2012-10-17 Thread Jordon Bedwell
On Wed, Oct 17, 2012 at 2:37 AM, Colin Law clan...@googlemail.com wrote: On 16 October 2012 23:15, Erwin yves_duf...@mac.com wrote: Thanks , I had that feeling... I'll test it by tomorrow ... is there any links related to this being illegal ? just for my notetaker pad ... If ever you have

Re: [Rails] Re: form tag is self-closing before input fields .. (HAML generator used)

2012-10-17 Thread Jordon Bedwell
On Wed, Oct 17, 2012 at 3:34 AM, Colin Law clan...@googlemail.com wrote: I don't understand what you mean by it's not allowed. If it parses without an error then how can it not be allowed? Or are you pointing out that the spec is inconsistent? Why would one want to do form / anyway? That's

Re: [Rails] Not all javascript files for asset pipeline:

2012-10-17 Thread Jordon Bedwell
On Wed, Oct 17, 2012 at 6:47 AM, Soichi Ishida li...@ruby-forum.com wrote: Not all javascript files are necessary for every page of app. If I put all JavaScript files in app/assets/javascripts/ , all of them are compiled and read in every page. I believe this is a waste of memory space and

Re: [Rails] 401 Unauthorized

2012-10-17 Thread Jordon Bedwell
On Wed, Oct 17, 2012 at 8:17 AM, Saravanan P saravana...@shriramits.com wrote: I creating both web site and mobile app. For this i am using common database to store data for both web site and mobile app. I developing mobile app through phonegap. While i submit form and try to store data

Re: [Rails] generate 10 UUID records and save it it database in rails

2012-10-17 Thread Jordon Bedwell
On Wed, Oct 17, 2012 at 8:34 AM, ruby rails li...@ruby-forum.com wrote: I need to create certain number of UUId records(based on the selection of drop down) and save it in the database. Now I am generating only one unique id. Can this be done in the model in this way. Or do I need to write a

Re: [Rails] Re: Not all javascript files for asset pipeline:

2012-10-18 Thread Jordon Bedwell
On Wed, Oct 17, 2012 at 7:22 PM, Soichi Ishida li...@ruby-forum.com wrote: Thanks everyone. I was worried about both server and client but especially about the client side. Sounds like I should not be worried about it too much. Now days Javascript parser themselves are pretty efficient, the

Re: [Rails] Why is max-age in config.static_cache_control being ignored?

2012-10-18 Thread Jordon Bedwell
On Wed, Oct 17, 2012 at 9:15 PM, Cary Cherng cche...@gmail.com wrote: In config/environments/production.rb I have set config.serve_static_assets = true config.static_cache_control = public, max-age=1000 If I remember right, anything served from /app/assets is not considered static to the

Re: [Rails] NameError?

2012-10-18 Thread Jordon Bedwell
On Thu, Oct 18, 2012 at 9:38 AM, wragen22 bradwr...@gmail.com wrote: Extracted source (around line #7): 4: 5:% @posts.each do |status| % 6:div class=post 7:strong%= post.title %/strong 8:/div 9: 10: % end % Took me all of

Re: [Rails] limitations of passing a block to class_eval

2012-10-19 Thread Jordon Bedwell
On Fri, Oct 19, 2012 at 8:28 PM, John Merlino stoici...@aol.com wrote: One shortcoming of define_method is that it does not allow you to specify a method body that expects a block. If you need to dynamically create a method that accepts a block, you will need to use the def statement within

Re: [Rails] Error occured while evaluating nil

2012-10-21 Thread Jordon Bedwell
On Sun, Oct 21, 2012 at 10:20 AM, Muhammad Salman li...@ruby-forum.com wrote: This is the code if !params[:ratings].nil? params[:ratings].each_key do |r| @selected_ratings r @movies Movie.where('rating = :rating', :rating = r) @sort = params[:sort] end

Re: [Rails] Is it possible to store the log file by day?

2012-10-21 Thread Jordon Bedwell
On Sun, Oct 21, 2012 at 5:29 PM, Victor Goff keeperotpho...@gmail.com wrote: Can you use logrotate or whatever the OS gives for rotating logs? Yes I agree you should be using logrotate because most logging in applications is not rotated by them, but instead by logrotate, this way you can easily

Re: [Rails] Re: My first database model - would you look at it pls?

2012-10-24 Thread Jordon Bedwell
On Wed, Oct 24, 2012 at 12:39 PM, Dave Aronson googlegroups2d...@davearonson.com wrote: On Wed, Oct 24, 2012 at 1:00 PM, Kevin McCaughey li...@ruby-forum.com wrote: As for the Bookings table, the reasoning behind this is in case there are multiple meetings going on in the same building, at the

Re: [Rails] How to use Ajax with rails ?

2012-10-26 Thread Jordon Bedwell
On Fri, Oct 26, 2012 at 10:38 AM, Fahim Patel pafa...@gmail.com wrote: Hi all, Can any one tell me how to use Ajax with Rails. Send me quick start up link and videos. Include jquery-rails and do it like you normally would. -- You received this message because you are subscribed to

Re: [Rails] JSON response , error message

2012-10-28 Thread Jordon Bedwell
On Sun, Oct 28, 2012 at 12:26 AM, Saravanan P saravana...@shriramits.com wrote: render :json = { :errors = @example.errors.full_messages }, :status = 422 Why are you sending a 422? If you really want to stick in the 400 range it would be more suitable to send a 409 conflict since it literally

Re: [Rails] Re: Rails Installer Problem

2012-10-29 Thread Jordon Bedwell
Install github for Windows so it will manage your keys and everything for you automatically, it's truly the easiest way to Work with git on Windows if it's your first time with Git. On Mon, Oct 29, 2012 at 12:25 PM, Norbert Melzer timmel...@gmail.com wrote: Where your ssh dir is, aber depends on

Re: [Rails] [JOB] Rails Developer - Denver Colorado

2012-10-30 Thread Jordon Bedwell
On Tue, Oct 30, 2012 at 2:43 AM, hanish jadala emailtohoneyr...@gmail.com wrote: can you give your mail id to send Resume Already failed. Look at the bottom of his email. Also, if you could miss that what would you miss in your code? -- You received this message because you are subscribed to

Re: [Rails] Newbie - deployment, hosting

2012-10-30 Thread Jordon Bedwell
On Tue, Oct 30, 2012 at 10:54 AM, Dave Aronson googlegroups2d...@davearonson.com wrote: On Tuesday, October 30, 2012, Dmitry Maksyoma wrote: Maybe if you have a large app, but it sounded like the app in question was a typical small learner app. In that case, he can likely host it there for

Re: [Rails] What is Formtastic and SimpleForm gem ? Is any one of this is by default included in Rails ?

2012-10-31 Thread Jordon Bedwell
Hi, On Wed, Oct 31, 2012 at 1:35 AM, Fahim Patel pafa...@gmail.com wrote: Q 1 Is any one of this is by default included in Rails ? No. Q2 Any advantage of this gems over simple form tags ? For me, most of the time there is not, actually they add overhead IMO (at least for my purposes) so

Re: [Rails] css background not showing

2012-10-31 Thread Jordon Bedwell
On Wed, Oct 31, 2012 at 1:28 AM, wragen22 bradwr...@gmail.com wrote: Hi, for some reason adding the following is doing nothing... Please note this list is for Rails questions, not HTML/CSS questions. .post.hover { background: FAFAFA; FAFAFA is not a valid value for background, and you

Re: [Rails] How to test recaptcha in localhost?

2012-11-02 Thread Jordon Bedwell
Hi, On Fri, Nov 2, 2012 at 12:44 AM, Fahim Patel pafa...@gmail.com wrote: I follow All the steps for recaptcha , but i am confused how to test on my local host. Q What should i enter in domain url ? Don't, mock the entire reCaptcha part http://rubydoc.info/gems/rspec-mocks/frames -- You

Re: [Rails] How to test recaptcha in localhost?

2012-11-02 Thread Jordon Bedwell
Hi, On Fri, Nov 2, 2012 at 1:34 AM, Fahim Patel pafa...@gmail.com wrote: But when i enter a captcha value , user registration is failing. So it is possible to run recaptcha on localhost or i have to deploy me code in production . My guess is it's most likely not reCaptcha that's failing but

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

2012-11-02 Thread Jordon Bedwell
On Fri, Nov 2, 2012 at 1:39 AM, Adnan adnan.a...@gmail.com 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

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

2012-11-02 Thread Jordon Bedwell
On Fri, Nov 2, 2012 at 4:13 AM, Alessio Peternelli alessio.peterne...@gmail.com 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

Re: [Rails] What to use .haml or .erb ?

2012-11-07 Thread Jordon Bedwell
On Wed, Nov 7, 2012 at 4:35 AM, Иван Бишевац ivan.bise...@gmail.com wrote: I use both, but prefer haml, because it's concise. I normally give clients a decision when the project starts (or make my own based on what they express their technical skill to be at the start of a project.) In short

Re: [Rails] Rails app slower on a new Dell with Ubuntu than on an old Mac

2012-11-07 Thread Jordon Bedwell
How are you compiling it? What are the packages you used to compile it? What version of Ubuntu? On Wed, Nov 7, 2012 at 3:28 PM, Osledy Bazó osledyb...@gmail.com wrote: Hello people, I have a problem but im not sure if is a problem at all. I've been working in a client project using a macbook

Re: [Rails] Re: How to open PDF file in browser ?

2012-11-07 Thread Jordon Bedwell
On Wed, Nov 7, 2012 at 10:21 PM, Rajesh reddy rajeshn...@gmail.com wrote: give :disposition = 'inline' in your controllers There are several quirks with sending inline to most browsers (for example if I remember right Firefox is still plagued by not using the name you set for inline) and IE has

Re: [Rails] Re: Hosting costs for a small up!

2012-11-10 Thread Jordon Bedwell
On Sat, Nov 10, 2012 at 6:02 PM, Matt Jones al2o...@gmail.com wrote: Costs can go up pretty quick on Heroku, but your application doesn't sound like it would need a whole lot of resources. If nothing else, starting out on the free plans on Heroku will provide you with a better understanding of

Re: [Rails] NEW TO PHP...RUBY ON RAILS?

2012-11-11 Thread Jordon Bedwell
On Sun, Nov 11, 2012 at 9:33 AM, Hassan Schroeder hassan.schroe...@gmail.com wrote: You need to learn several languages and frameworks as part of becoming a reasonably competent programmer. The more diverse the better, but the exact choices are up to you :-) Jack of all trades, master of

Re: [Rails] How can I change the notice to a text with a variable

2012-11-12 Thread Jordon Bedwell
redirect_back_or_to(:users, notice: Welcome, #{@user.username}) Though you shouldn't do that in the redirect, you should probably just make that a default part of the view if the session has a user_id. On Mon, Nov 12, 2012 at 5:19 AM, roelof rwob...@hotmail.com wrote: Hello, I have this

Re: [Rails] best practices in methods

2012-11-13 Thread Jordon Bedwell
On Tue, Nov 13, 2012 at 6:22 AM, rodrigo coutinho rodrigo.coutinh...@gmail.com wrote: Consider this code, it gets a mention and an array of tags. It finds the mentions and add the tags. But in my methods I keep using return if foo.nil? or execute a line of code if a line is not nil. Is there

Re: [Rails] Re: How can I prevent ENTER from submitting form?

2012-11-15 Thread Jordon Bedwell
On Thu, Nov 15, 2012 at 10:23 AM, Albert Català li...@ruby-forum.com wrote: Easy and clean, thanks you If you want/need to prevent enter from submitting a form, you are doing it wrong and you could be be alienating some disabled people who do not use a mouse and rely on their keyboard. I know

Re: [Rails] in standby for an annoying problem.

2012-11-15 Thread Jordon Bedwell
On Thu, Nov 15, 2012 at 10:37 AM, Colin Law clan...@googlemail.com wrote: Experimentation shows me that you are right, that is a bit of rails magic that I was not aware of. In fact it seems that one can call any class method on an ActiveRecord relation for the class. Thanks for the

Re: [Rails] in standby for an annoying problem.

2012-11-15 Thread Jordon Bedwell
On Thu, Nov 15, 2012 at 11:15 AM, Colin Law clan...@googlemail.com wrote: I was trying to ask the general question, that if one has a scope and a class method that perform exactly the same operation (such as the example in this thread), so scope :today_reservations, lambda {

Re: [Rails] rake test:units error because not null constraint.

2012-11-18 Thread Jordon Bedwell
On Sun, Nov 18, 2012 at 1:42 PM, Mauro mrsan...@gmail.com wrote: Hello. I have this unit test: test User validations do user = User.new assert user.invalid? assert user.errors[:uid].any? assert user.errors[:name].any? assert user.errors[:role].any? end You should probably move

Re: [Rails] Forcing a reload for all user sessions

2012-11-19 Thread Jordon Bedwell
On Mon, Nov 19, 2012 at 4:53 AM, David M idav...@gmail.com wrote: I'm storing some user info in session (like the name, using cookies), in Ruby on Rails 3.2 Let's suppose the user opens the site in two different browsers, and logs He changes his name in one browser, and switches to the other

Re: [Rails] rake task ) fileutils how to remove parent specific folder

2012-11-20 Thread Jordon Bedwell
On Tue, Nov 20, 2012 at 5:08 AM, Erwin yves_duf...@mac.com wrote: I have a fixtures directory structure fixtures en alpha beta delta es alpha beta delta __SNIP__ is there a way to remove all folders with name 'alpha' in ALL locales folder, and get a

Re: [Rails] rake task ) fileutils how to remove parent specific folder

2012-11-20 Thread Jordon Bedwell
On Tue, Nov 20, 2012 at 5:18 AM, Jordon Bedwell envyge...@gmail.com wrote: On Tue, Nov 20, 2012 at 5:08 AM, Erwin yves_duf...@mac.com wrote: I have a fixtures directory structure fixtures en alpha beta delta es alpha beta delta __SNIP__ is there a way

Re: [Rails] Rails 3.2 Extending String Core Classe as per Rails doc

2012-11-20 Thread Jordon Bedwell
On Tue, Nov 20, 2012 at 10:46 AM, Erwin yves_duf...@mac.com wrote: in yoodle/lib/my_app/core_ext String.class_eval do def to_squawk squawk! #{self}.strip end end and I have added in yoodle/config/application.rb config.autoload_paths += Dir[#{config.root}/lib,

Re: [Rails] Re: Opinion on a particular use of Initializers

2012-11-21 Thread Jordon Bedwell
On Wed, Nov 21, 2012 at 8:57 PM, Alex Braha Stoll alexbrahast...@gmail.com wrote: Thanks for the answer, Fred. When you say lazily loading the data I need you mean waiting for a first request that uses the data, right? If so, how can I do that in a way that the data will persist for the next

Re: [Rails] Issues with rails resourceful routes

2012-11-22 Thread Jordon Bedwell
On Thu, Nov 22, 2012 at 6:58 AM, Dan Brooking dmbrook...@gmail.com wrote: __SNIP__ The problem I face is it works for part of the URL. So if I do: http://localhost:3000/pages/http%3A%2F%2F or http://localhost:3000/pages/http%3A%2F%2Fguides or

Re: [Rails] Loding only active_record for rspec model tests

2012-11-26 Thread Jordon Bedwell
On Mon, Nov 26, 2012 at 7:58 AM, venkata reddy venkatareddy...@gmail.com wrote: Anybody have a better idea? Don't run rspec command? Use Guard and keep on developing letting it tell you when tests fail and pass rather than caring about the 1 second, it's inefficient to stop and run rspec when

Re: [Rails] Hosting with email accounts?

2012-11-26 Thread Jordon Bedwell
On Sun, Nov 25, 2012 at 10:56 PM, Norbert Melzer timmel...@gmail.com wrote: don't use heroku, but at least in Germany there are virtual root servers with full DNS control and integrated mail servers for less than 15 USD (10 Eur) a month. Because you can't get the same thing in the US, UK,

Re: [Rails] Hosting with email accounts?

2012-11-26 Thread Jordon Bedwell
On Mon, Nov 26, 2012 at 10:07 AM, Norbert Melzer timmel...@gmail.com wrote: Sorry, wasn't meant to be imperative, there is missing a simple I, I can't now about the prices in the whole world but in Germany. So I wrote that this applies to Germany. I still hoped that there are similar offers all

Re: [Rails] Having two paths for a single action with different parameters

2012-11-28 Thread Jordon Bedwell
On Wed, Nov 28, 2012 at 2:42 AM, Sumit Srivastava sumit.theinvinci...@gmail.com wrote: Hi, I have a controller named users and index action in it. By default I have the path get '/users' = 'users#index', :as = 'users' Now I want to create one more path with a different parameter being

Re: [Rails] Having two paths for a single action with different parameters

2012-11-28 Thread Jordon Bedwell
On Wed, Nov 28, 2012 at 2:57 AM, sumit srivastava sumit.theinvinci...@gmail.com wrote: Yes, I did try this but it didn't. In fact, the custom route I defined, if I define it as following it works. get '/users' = 'users#index', :as = 'list_users' But as soon as I define the extra parameter

Re: [Rails] Having two paths for a single action with different parameters

2012-11-28 Thread Jordon Bedwell
On Wed, Nov 28, 2012 at 3:17 AM, sumit srivastava sumit.theinvinci...@gmail.com wrote: I just found that the value I was passing had a . in it. And somehow this was creating problem. Not sure why. I experimented with other special Add value: /.*/ to the end of the /users/:city route. -- You

Re: [Rails] Rails seo friendly urls

2012-11-28 Thread Jordon Bedwell
On Wed, Nov 28, 2012 at 3:12 AM, Maddy ashokku...@shriramits.com wrote: http://.com/product_details?category_id=produceproduct_id=fresh-georgia-peaches--17 That is not an SEO unfriendly URL. The highlighted (red) things are my params. http://guides.rubyonrails.org/routing.html -- You

Re: [Rails] Rails seo friendly urls

2012-11-28 Thread Jordon Bedwell
On Wed, Nov 28, 2012 at 3:49 AM, Ashokkumar Yuvarajan ashokku...@shriramits.com wrote: Yes, am asking how can i optimize this url as a friendly url?? The link I sent tell you how to do it. Depending on how you have your actions setup depends on how easy it is. If your actions are designed to

Re: [Rails] Google Drive

2012-11-28 Thread Jordon Bedwell
On Tue, Nov 27, 2012 at 6:34 AM, bacancy nirav bacancy.ni...@gmail.com wrote: is there any solution for upload folder on google drive . Just a small tip for next time, normally if you ask Google search questions about Google products and integration it will send you to the right spot, but either

Re: [Rails] multiple file upload to amazon s3 using jquery file upload rails app

2012-11-28 Thread Jordon Bedwell
On Tue, Nov 27, 2012 at 4:02 PM, Sahil Shah sahil.shah...@gmail.com wrote: When I try to upload single/multiple file I get alert box saying failed to upload and in console it says Failed to load resource: the server responded with a status of 403 (Forbidden) and XMLHttpRequest cannot

Re: [Rails] Re: why we are Using self.method_name?

2012-11-28 Thread Jordon Bedwell
On Wed, Nov 28, 2012 at 6:46 AM, thil thil.1...@gmail.com wrote: Self.methods is static methods using the class name itself you can call the methods and is not available to the instance of the class. There is no such thing as static methods in Ruby. self.method_name (or sometimes

Re: [Rails] has_and_belongs_to_many for the same model

2012-11-29 Thread Jordon Bedwell
On Wed, Nov 28, 2012 at 9:33 PM, Soichi Ishida li...@ruby-forum.com wrote: I am wondering if has_and_belongs_to_many association can be used for a single model? Circular associations are possible, I do it all the time for comment systems. -- You received this message because you are

Re: [Rails] Is it ok to use struct as constants in initializer?

2012-11-29 Thread Jordon Bedwell
On Thu, Nov 29, 2012 at 3:47 AM, comopasta Gr li...@ruby-forum.com wrote: error_type = Struct.new(:code, :description) BAD_JSON = error_type.new(001 , Problem parsing JSON) BAD_XML = error_type.new(002 , Problem parsing XML) class MyClass class APIParseError StandardError def

Re: [Rails] Is it ok to use struct as constants in initializer?

2012-11-29 Thread Jordon Bedwell
On Thu, Nov 29, 2012 at 4:11 AM, Jordon Bedwell envyge...@gmail.com wrote: raise(MyClass::APIParseError.new(001, :XML)) #= MyClass::MyError: 001: Problem parsing XML This would actually display: MyClass::APIParseError I had a misspelling since I didn't run it through an REPL to get the output I

Re: [Rails] Adding a input field (select box) to a cell in a table that is rendered from controller

2012-11-29 Thread Jordon Bedwell
On Thu, Nov 29, 2012 at 4:15 AM, Colin Law clan...@googlemail.com wrote: The Rails Guide on Form Helpers shows you how to make select boxes. Remember that for valid html the entire table must lie within the form, or each cell must contain its own form. Aren't tables are violation of the HTML

  1   2   3   >