Re: [Rails] Re: Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread John Lahr
If you are cutting and pasting exactly from your view to your HTML it seems kind of odd. The 'form group' is showing up not where you put it before the form, but before the input field. The Submit button still says submit, not update as you indicate in your view. Also - your missing the f.label

[Rails] Re: Re: Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread Abdulaleem Seyed
John Lahr wrote in post #1178417: > If you are cutting and pasting exactly from your view to your HTML it > seems > kind of odd. > > The 'form group' is showing up not where you put it before the form, but > before the input field. > The Submit button still says submit, not update as you indicate

Re: [Rails] Re: Re: Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread John Lahr
I'm glad you were able to get it to work - but does the button work to submit your form? In my usage, btn btn-primary work on most elements. Not sure why changing the tag makes it work and now am concerned that your form won't submit based on the above code? -- You received this message because

Re: [Rails] how testing associated objects?

2015-09-01 Thread Walter Lee Davis
> On Sep 1, 2015, at 2:40 PM, Zlodiak Zlodiak wrote: > > please help solve the problem. > > poll controller: > > class PollsController < ApplicationController > def index >@user = User.find(params[:user_id]) >@polls = @user.polls.paginate(page: params[:page],

[Rails] Re: Re: Re: Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread Abdulaleem Seyed
John Lahr wrote in post #1178421: > I'm glad you were able to get it to work - but does the button work to > submit your form? > In my usage, btn btn-primary work on most elements. Not sure why > changing > the tag makes it work and now am concerned that your form won't submit > based on the

Re: [Rails] Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread Colin Law
On 1 September 2015 at 16:41, Abdulaleem Seyed wrote: > I am trying to add bootstrap styling to my rails form_for form. Such > that I can change the button styling and make the from inline. I tried > adding doing something like: > > > <%= f.submit "Create your account",

Re: [Rails] Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread John Lahr
You're right it shouldn't matter but when things aren't working like they should be without any obvious explanation you try everything. And BTW <%= f.submit class: 'btn btn-success' %> That shouldn't work either if you copied and pasted right from your code because there's a comma

Re: [Rails] rails is not recognized as an internal or external command

2015-09-01 Thread Colin Law
On 1 September 2015 at 20:33, Richard Beardwood wrote: > I have just installed Ruby on Rails on Windows 8 and tested it including > checking the version. This all works fine however, when I try to set up > a new project using rails I get "rails is not recognized as an

[Rails] Re: rails is not recognized as an internal or external command

2015-09-01 Thread Richard Beardwood
Yes that is correct. rails -v shows: ruby 2.1.6p336 <2015-04-13 revision 50298> [i386-mingw32] -- 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

Re: [Rails] Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread Walter Lee Davis
> On Sep 1, 2015, at 2:32 PM, John Lahr wrote: > > One issue I had when I was trying to get bootstrap fully to work was that I > hadn't included it in my application.js file (i know for sure i needed it for > drop downs, I don't know what else you might need it for). So

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Walter Lee Davis
> On Sep 1, 2015, at 1:06 PM, Elizabeth McGurty wrote: > > I have no idea as to what you are saying. I offer solutions voluntarily to > the best of my ability. I am visually impaired because I cannot afford > better eye glasses, so in response I write to wordpad and

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Colin Law
On 1 September 2015 at 20:10, Walter Lee Davis wrote: > >> On Sep 1, 2015, at 1:06 PM, Elizabeth McGurty wrote: >> >> I have no idea as to what you are saying. I offer solutions voluntarily to >> the best of my ability. I am visually impaired because I

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Elizabeth McGurty
I have no idea as to what you are saying. I offer solutions voluntarily to the best of my ability. I am visually impaired because I cannot afford better eye glasses, so in response I write to wordpad and just respond. On Tuesday, September 1, 2015 at 12:04:37 PM UTC-4, Walter Lee Davis

Re: [Rails] Re: Re: Re: Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread John Lahr
One issue I had when I was trying to get bootstrap fully to work was that I hadn't included it in my application.js file (i know for sure i needed it for drop downs, I don't know what else you might need it for). So if you haven't done that I'd look at the code. Honestly though <%= f.submit,

[Rails] how testing associated objects?

2015-09-01 Thread Zlodiak Zlodiak
please help solve the problem. poll controller: class PollsController < ApplicationController def index @user = User.find(params[:user_id]) @polls = @user.polls.paginate(page: params[:page], :per_page => 10).order(title: :DESC) end end route: user_polls GET

[Rails] rails is not recognized as an internal or external command

2015-09-01 Thread Richard Beardwood
I have just installed Ruby on Rails on Windows 8 and tested it including checking the version. This all works fine however, when I try to set up a new project using rails I get "rails is not recognized as an internal or external command" -- Posted via http://www.ruby-forum.com/. -- You

Re: [Rails] Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread Walter Lee Davis
> On Sep 1, 2015, at 3:16 PM, John Lahr wrote: > > You're right it shouldn't matter but when things aren't working like they > should be without any obvious explanation you try everything. > > And BTW > > > <%= f.submit class: 'btn btn-success' %> > > > That

[Rails] [JOB] Looking for RoR Job (Fresher)

2015-09-01 Thread Deepak Sharma
Currently, I have completed my B.Tech in I.T from GNDEC in may 2015. I am looking for the job mainly as full time Ruby on Rails developer. Are there are opportunity for the same. I have attached my CV. Please contact me on my email id : deeky.sha...@gmail.com -- Cheers! Deepak Kumar Sharma Guru

Re: [Rails] Re: rails is not recognized as an internal or external command

2015-09-01 Thread Colin Law
On 1 September 2015 at 20:48, Richard Beardwood wrote: > Yes that is correct. > rails -v shows: > ruby 2.1.6p336 <2015-04-13 revision 50298> [i386-mingw32] I rather suspect that is the result of ruby -v not rails -v. So ruby is installed but not rails. Please remember to

[Rails] Re: rails is not recognized as an internal or external command

2015-09-01 Thread Richard Beardwood
>I agree. I think the OP is calling ‘ruby -v’ and needs to install the >rails gem. I’ve done this before on a fresh system. Should be able to >do a “gem install rails” and move on from there. Thanks. You are right. I am new to this and just getting started so thanks for the help -- Posted

Re: [Rails] Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread John Lahr
This is more of a display/view problem - the issue is more likely going to be in your stylesheet, appplication.html.erb or this specific view erb file -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and

Re: [Rails] Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread John Lahr
PS - does the form work even if the styling doesn't? Can you submit emails? On Tue, Sep 1, 2015 at 1:19 PM, John Lahr wrote: > This is more of a display/view problem - the issue is more likely going to > be in your stylesheet, appplication.html.erb or this specific view

Re: [Rails] Re: Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread John Lahr
If that is the case it would sound like there's something going in in your style sheets cascading to this view specifically, and the problem won't be found in the controller, it'll be found in your assets/stylesheets, layout/application.html.erb or this specific view itself. There's probably some

[Rails] Re: Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread Abdulaleem Seyed
John Lahr wrote in post #1178443: > PS - does the form work even if the styling doesn't? Can you submit > emails? Yes. The form works completely. The styling is the problem in this form only. The same buttons are working in other places with no problem. -- Posted via

Re: [Rails] rails is not recognized as an internal or external command

2015-09-01 Thread James Jelinek
> On Sep 1, 2015, at 2:52 PM, Colin Law wrote: > > I rather suspect that is the result of ruby -v not rails -v. So ruby > is installed but not rails. > > Please remember to quote the previous message so that it easier to > follow the thread, this is a mailing list not a

[Rails] Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread Abdulaleem Seyed
Here is the code entirely: class SubscriptionsController <%= f.text_field :email %> <%= f.submit "Create", class: 'btn btn-success' %> <% end %> -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on

[Rails] get direct text using Nokogiri

2015-09-01 Thread Sai Ch
How can I get venue and address values from this code using Nokogiri Venue: Treasure Island Address: Avenue of the Palms, San Francisco, CA -- 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

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread tamouse pontiki
On Sat, Aug 29, 2015 at 10:26 AM, Colin Law wrote: > On 29 August 2015 at 16:08, tamouse pontiki > wrote: > > can you memoize the result of test? assuming it wouldn't change between > > callbacks? otherwise, write one callback and perform all the

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Colin Law
On 1 September 2015 at 13:29, tamouse pontiki wrote: > > > On Sat, Aug 29, 2015 at 10:26 AM, Colin Law wrote: >> >> On 29 August 2015 at 16:08, tamouse pontiki >> wrote: >> > can you memoize the result of test? assuming it

[Rails] Rails 4 asset pipeline generates different digest in different environments

2015-09-01 Thread Sri
Hello, I am facing this weird issue. I believe the asset digests are generated based on the content of the file. However, when I deploy my application using Capistrano to staging environments and multiple boxes in production environment, I see different digests everywhere. E.g. In staging

Re: [Rails] Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread John Lahr
How have you integrated bootstrap into your application? -- 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 rubyonrails-talk+unsubscr...@googlegroups.com.

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Elizabeth McGurty
Oh! Am I a bad girl because I don't press the right buttons? On Tuesday, September 1, 2015 at 12:53:10 PM UTC-4, Elizabeth McGurty wrote: > > I have no idea as to what you are talking aboutEtiquette??? I think > that I always follow it... > > On Tuesday, September 1, 2015 at 12:04:37 PM

[Rails] Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread Abdulaleem Seyed
John Lahr wrote in post #1178401: > You need to add the classifications within the erb code. > > For instance > > <%= f.submit, class: "btn btn-primary" %> > > (PS it seems like you might be customizing the create button so you have > to > list that in the ERB code for it to show up properly) > >

[Rails] Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread Abdulaleem Seyed
Walter Davis wrote in post #1178402: >> However, it did not work. Here is my code in my file. >> >> <%= form_for @subscription do |f| %> >> <%= f.text_field :email %> >> <%= f.submit %> >> <% end %> >> > > When you view that in a browser, what do you see? > > Bootstrap 3 doesn’t require a

Re: [Rails] get direct text using Nokogiri

2015-09-01 Thread Hassan Schroeder
On Tue, Sep 1, 2015 at 3:21 AM, Sai Ch wrote: > How can I get venue and address values from this code using Nokogiri > > Venue: Treasure Island > Address: Avenue of the Palms, San Francisco, CA The Nokogiri docs have plenty of example code; what have you tried so far? --

[Rails] Re: Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread Abdulaleem Seyed
John Lahr wrote in post #1178409: > How have you integrated bootstrap into your application? gem 'bootstrap-sass', '~> 3.3.5' In my custom stylesheet.css.scss @import "bootstrap-sprockets"; @import "bootstrap"; Bootstrap is working all through my site, except with this form problem. --

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Elizabeth McGurty
I have no idea as to what you are talking aboutEtiquette??? I think that I always follow it... On Tuesday, September 1, 2015 at 12:04:37 PM UTC-4, Walter Lee Davis wrote: > > > > On Sep 1, 2015, at 11:55 AM, Elizabeth McGurty > wrote: > > > > Too existential for me...

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Elizabeth McGurty
And I am also super confused as to the notion of 'memorising'. What does that mean? Kids memorise the alphabet and times tables, what does that metaphor mean in terms of Ruby and Ruby on Rails? Memorising is a process of repeatedly iterating through a series that must eventually be held in

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Colin Law
On 1 September 2015 at 15:43, Stewart Mckinney wrote: > I don't see any reason why not to wrap something like this in a > before_filter block/lambda. That way you avoid the silly function name, and > I wouldn't consider that coupling. I am not entirely sure what you mean,

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Stewart Mckinney
I don't see any reason why not to wrap something like this in a before_filter block/lambda. That way you avoid the silly function name, and I wouldn't consider that coupling. Also, Liz, I think he means "record or store the relevant information in another format", such if the response was a large

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Walter Lee Davis
As you read through Ruby code, you may see this construction: @foo ||= some_expensive_operation(parameters) That’s known as memoizing (take a memo) or memorizing (or memorising if you’re in England). What it does is take the existing value if the expensive operation has already run once, or

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Stewart Mckinney
Like: before_filter do result = test? unless result return f1 && ( action_name !="show" || f2 ) end end That's playing some "ruby golf" , you can pull that apart to make it as readable as you want ( honestly I actually perfer 'and' and 'or' but that would result in some

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Colin Law
On 1 September 2015 at 15:41, Elizabeth McGurty wrote: > And I am also super confused as to the notion of 'memorising'. What does > that mean? Kids memorise the alphabet and times tables, what does that > metaphor mean in terms of Ruby and Ruby on Rails? Memorising is a

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Elizabeth McGurty
Colin, please show your result.. On Tuesday, September 1, 2015 at 9:04:59 AM UTC-4, Colin Law wrote: > > On 1 September 2015 at 13:29, tamouse pontiki > wrote: > > > > > > On Sat, Aug 29, 2015 at 10:26 AM, Colin Law > wrote: > >> > >> On 29 August

[Rails] Immediate Need: Ruby on Rails Developer (6 to 10Yrs) @ RealPage (Product based MNC), Hyderabad

2015-09-01 Thread Shravan Kumar
*Good Evening, * *Greetings from Great Place to Work - 2015 * *RealPage (Product based MNC), Hyderabad is looking for Ruby on Rails Developer* Work Location: Hyderabad *Looking for immediate joinees*. *Must Have Skills: * *Must have Product based environment

[Rails] Heroku rails producion enviroment removing css vendor prefixes

2015-09-01 Thread Ekaitz Hernández Troyas
I am pushing my code to heroku with a production.rb enviroment file and when I open the css file that rails has created all css vendor prefixes have disappeared. May be sass-rails gem is doing something weird. My css with development.rb http://pastebin.com/wbWwgvDG [layout-align="center

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Colin Law
On 1 September 2015 at 16:33, Elizabeth McGurty wrote: > Very nice! The all important ||= Now if I could just convince you of the benefits of inline posting rather than top posting then I would feel my life was worth while after all :) Colin > > > On Tuesday, September 1,

[Rails] Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread Abdulaleem Seyed
I am trying to add bootstrap styling to my rails form_for form. Such that I can change the button styling and make the from inline. I tried adding doing something like: <%= f.submit "Create your account", class: "btn btn-primary" %> However, it did not work. Here is my code in my file.

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Colin Law
On 1 September 2015 at 15:54, Stewart Mckinney wrote: > Like: > > before_filter do > > result = test? > > unless result > return f1 && ( action_name !="show" || f2 ) > end > > end > > That's playing some "ruby golf" , you can pull that apart to make it as >

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Elizabeth McGurty
So my suggestion of do had some value? On Tuesday, September 1, 2015 at 11:44:00 AM UTC-4, Colin Law wrote: > > On 1 September 2015 at 15:54, Stewart Mckinney > wrote: > > Like: > > > > before_filter do > > > > result = test? > > > > unless result > >

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Walter Lee Davis
> On Sep 1, 2015, at 11:55 AM, Elizabeth McGurty wrote: > > Too existential for me... I just click the button... > All the best... > Liz Liz, are you stuck in the G-jail web interface, or the web view of Google Groups? Your desktop mail app can connect to Gmail easily,

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Elizabeth McGurty
Very nice! The all important ||= On Tuesday, September 1, 2015 at 11:01:57 AM UTC-4, Colin Law wrote: > > On 1 September 2015 at 15:41, Elizabeth McGurty > wrote: > > And I am also super confused as to the notion of 'memorising'. What > does > > that mean? Kids

[Rails] Re: Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread John Lahr
You need to add the classifications within the erb code. For instance <%= f.submit, class: "btn btn-primary" %> (PS it seems like you might be customizing the create button so you have to list that in the ERB code for it to show up properly) On Tuesday, September 1, 2015 at 8:43:34 AM UTC-7,

Re: [Rails] Multiple conditions on filters

2015-09-01 Thread Elizabeth McGurty
Too existential for me... I just click the button... All the best... Liz On Tuesday, September 1, 2015 at 11:41:29 AM UTC-4, Colin Law wrote: > > On 1 September 2015 at 16:33, Elizabeth McGurty > wrote: > > Very nice! The all important ||= > > Now if I could just convince

Re: [Rails] Adding bootstrap styling to ruby on rails form_for

2015-09-01 Thread Walter Lee Davis
> On Sep 1, 2015, at 11:41 AM, Abdulaleem Seyed wrote: > > I am trying to add bootstrap styling to my rails form_for form. Such > that I can change the button styling and make the from inline. I tried > adding doing something like: > > > <%= f.submit "Create your