[Rails] Default value for country_select

2014-03-12 Thread Anu Sebastian
how to add defult value to the country_select gem.. pls help me -- 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, send an email t

Re: [Rails] What is your style? Single quote, double quotes or depends?

2014-03-12 Thread Emil S
There's no best practice here. The ruby style guidewhich Rubocop depends on, which is kind of popular, allows both conventions. The key here is to pick one style and stick with it. My team here uses Rubocop with one of the styles

Re: [Rails] What is your style? Single quote, double quotes or depends?

2014-03-12 Thread Dheeraj Kumar
I use single quotes for the same reasons as you :) I use double quotes only when I'm doing interpolation. On Thu, Mar 13, 2014 at 10:22 AM, Brandon wrote: > I'm curious what is the best practice here.. Do you use single quote for > both .html.erb and .rb files? > > I try to use single quote fir

Re: [Rails] What is your style? Single quote, double quotes or depends?

2014-03-12 Thread tamouse pontiki
On Wed, Mar 12, 2014 at 11:52 PM, Brandon wrote: > I'm curious what is the best practice here.. Do you use single quote for > both .html.erb and .rb files? > > I try to use single quote first as much as I can because I find the > readability is better and it takes up less spaces each line. > > Wha

[Rails] What is your style? Single quote, double quotes or depends?

2014-03-12 Thread Brandon
I'm curious what is the best practice here.. Do you use single quote for both .html.erb and .rb files? I try to use single quote first as much as I can because I find the readability is better and it takes up less spaces each line. What has been your experience? -- You received this message

[Rails] [JOB] Robust RoR Web Application in NYC

2014-03-12 Thread Kyle Lee
Hello All, I know that a local position is not optimal, but I'm working for a funding company that is overhauling their existing RoR platform and is looking to bring on another full time Ruby developer. The team is 10 strong right now, each having strong programming fundamentals and they are no

[Rails] Re: Four way JOIN (many-to-many + lookup); preventing duplicates when using scopes

2014-03-12 Thread Steve
Nevermind. I don't know what I was thinking using @request.users directly when I should have been using @request.request_user_roles instead. This works fine: @request.request_user_roles.joins(:request_role_types).merge(RequestRoleType.is_initiator) Then I can get the User and the user's Role f

[Rails] Refactoring routes question

2014-03-12 Thread Dave Castellano
Hi, I am wondering if there is any refactoring possible in the following routes as there seems to be a lot of redundancy in the code. I am learning on my own so the answer may be obvious and I appreciate the help. # Routes for navigating contents: #Books get 'contents/index_books/:subject_id

Re: [Rails] [Devise] redundant use of method: :delete while using destroy_user_session_path

2014-03-12 Thread Walter Lee Davis
On Mar 12, 2014, at 10:25 AM, Colin Law wrote: > On 12 March 2014 02:04, Walter Lee Davis wrote: >> >> On Mar 11, 2014, at 4:59 PM, Colin Law wrote: >> >>> On 11 March 2014 10:27, Arun kant sharma wrote: My question is that why link_to method does not default to DELETE method when p

Re: [Rails] [Devise] redundant use of method: :delete while using destroy_user_session_path

2014-03-12 Thread Colin Law
On 12 March 2014 02:04, Walter Lee Davis wrote: > > On Mar 11, 2014, at 4:59 PM, Colin Law wrote: > >> On 11 March 2014 10:27, Arun kant sharma wrote: >>> My question is that why link_to method does not default to DELETE method >>> when passed link is destroy_user_session_path as we know from rou

[Rails] Re: How to batch create posts?

2014-03-12 Thread Abdulsattar Mohammed
Hi Giri, There's a gem 'activerecord-import' (https://github.com/zdennis/activerecord-import/wiki) that lets you do that easily. All you need to do is call, `Url.import urls` On Wednesday, March 12, 2014 8:40:57 AM UTC+5:30, Giri wrote: > > So I have bookmark controller which has the 7 default