Re: [Rails] Re: How to loop through model scopes to generate a listing?

2014-05-06 Thread Lauree Roberts
You can use send method for calling scopes as followed: <%- %w(scope1 scope2).each do |scope| <%= scope %> <%- Model.send(scope.to_sym).each do |record| %> <%= record.attribute%> <%- end%> <%- end %> However looping more than a scope may cause huge data to be rendered on a single page.

[Rails] Re: How to loop through model scopes to generate a listing?

2014-05-06 Thread Lauree Roberts
You can use send method for calling scopes as followed: <%- %w(scope1 scope2).each do |scope| <%= scope %> <%- Model.send(scope.to_sym).each do |record| %> <%= record.attribute%> <%- end%><%- end %> Thanks, Lauree Ruby on Rails Developer Allerin Technologies

[Rails] Re: Why is Sanitizing SQL Fragments so Highly Muddled?

2014-05-06 Thread mike2r
On Monday, May 5, 2014 3:08:17 PM UTC-4, Tyler DeWitt wrote: > > I've found there are some times where jumping straight to the database is > easier than going through ActiveRecord (for instance: odd calculations > being performed or large sets of data being returned that don't need to be > ins

Re: [Rails] Re: Re: Re: Re: Re: Ruby on Rails Kgio segmentation fault

2014-05-06 Thread Colin Law
On 6 May 2014 16:52, Ed Ed wrote: >> What does the error say now? Copy/paste here to avoid typos. > > The error is written in my question. So it is still running the wrong ruby? Colin > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed

[Rails] Re: Re: Re: Re: Re: Ruby on Rails Kgio segmentation fault

2014-05-06 Thread Ed Ed
> Googling for > kgio segmentation fault > found this as the first hit, is it helpful? > https://www.digitalocean.com/community/questions/unicorn-not-starting Yes, I have already viewed that.It didn't help me. -- Posted via http://www.ruby-forum.com/. -- You received this message because you a

[Rails] Re: Re: Re: Re: Re: Ruby on Rails Kgio segmentation fault

2014-05-06 Thread Ed Ed
> What does the error say now? Copy/paste here to avoid typos. The error is written in my question. -- 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 rece

[Rails] Red carpet syling?

2014-05-06 Thread Colin Stodd
So I added the rubygem "Redcarpet", and I have everything working fine, however it has changed the "font-size", "line-height" of my generated posts. I have tried adding "classes" and "id's", but nothing seems to be taking effect. Anyone know whats going on here? -- You received this message

[Rails] Re: Why is Sanitizing SQL Fragments so Highly Muddled?

2014-05-06 Thread Frederick Cheung
On Monday, May 5, 2014 8:08:17 PM UTC+1, Tyler DeWitt wrote: > > I've found there are some times where jumping straight to the database is > easier than going through ActiveRecord (for instance: odd calculations > being performed or large sets of data being returned that don't need to be > ins

Re: [Rails] [Job] Ruby-on-Rails developer needed

2014-05-06 Thread Josue Figueroa
Hi, I am interested in the RoR Developer job. I am attaching my resume. Regards, Josue Figueroa 2014-05-01 11:55 GMT-07:00 Benny R. : > Software Engineer - Ruby on Rails > Location: Brooklyn, NYC > Permanent - Direct Hire > Salary: Competitive > > We are looking for a talented and motivated so

[Rails] js .closest

2014-05-06 Thread Werner
I have a script: $ -> $(document).on 'change', ('.ops_select'), -> val = $(".ops_select option:selected").val() $.ajax '/projects/update_oncalls/', type: 'GET' dataType: 'script' data: {ops_group_id: val } which triggers a "update_concalls.js.coffee" file to replace a

[Rails] Google map path information in my sql

2014-05-06 Thread Imtiaz Sajid
Hi, i want to save the path information from Google map to database and display the same as well. Regards, imtiaz -- 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

[Rails] Set value using Jquery in Select List on Nested Form

2014-05-06 Thread Dante Gobetti
Hi, I am new to Rails. Been struggle finding solution for s long. Too long I think. I have nested form: <%= f.fields_for :items do |i| %> <%= render 'item_fields', :f => i %> <% end %> <%= link_to_add_association '+ product', f, :items %>

Re: [Rails] Re: Re: Re: Re: Ruby on Rails Kgio segmentation fault

2014-05-06 Thread Colin Law
On 6 May 2014 13:58, Ed Ed wrote: > Ok, I have done that from script and it shows that ruby is 2.1.0, but > the error with kgio gem still exists. Googling for kgio segmentation fault found this as the first hit, is it helpful? https://www.digitalocean.com/community/questions/unicorn-not-starting

Re: [Rails] Re: Re: Re: Re: Ruby on Rails Kgio segmentation fault

2014-05-06 Thread Colin Law
On 6 May 2014 13:58, Ed Ed wrote: > Ok, I have done that from script and it shows that ruby is 2.1.0, but > the error with kgio gem still exists. What does the error say now? Copy/paste here to avoid typos. Colin > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this messag

[Rails] Re: Re: Re: Re: Ruby on Rails Kgio segmentation fault

2014-05-06 Thread Ed Ed
Ok, I have done that from script and it shows that ruby is 2.1.0, but the error with kgio gem still exists. -- 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 st

Re: [Rails] Re: Re: Re: Ruby on Rails Kgio segmentation fault

2014-05-06 Thread Karthik Sirasanagandla
Jus' to be clear, add the said two things in your unicorn.sh script and see the output to help debugging. Makes sense? On Tue, May 6, 2014 at 4:51 PM, Ed Ed wrote: > > Two things: > > 1. Add an echo to output the version of ruby used > > 2. Let the first/initialization command be to use the rig

[Rails] Re: Re: Re: Ruby on Rails Kgio segmentation fault

2014-05-06 Thread Ed Ed
> Two things: > 1. Add an echo to output the version of ruby used > 2. Let the first/initialization command be to use the right version of > ruby, say something like `rvm use ruby-2.x.x` rvm current and default is set to ruby-2.1.0 -- Posted via http://www.ruby-forum.com/. -- You received this

Re: [Rails] Getting started with Ajax

2014-05-06 Thread Alfredo Barrero
El martes, 6 de mayo de 2014 13:19:30 UTC+2, Alfredo Barrero escribió: > > I'm having a new issue related with this. I have been searching the reason > of it but I cannot fix it. > > I have this button: > > *<%= button_to 'Go to Gallery', loading_gallery_path, > remote: tr

Re: [Rails] Getting started with Ajax

2014-05-06 Thread Alfredo Barrero
I'm having a new issue related with this. I have been searching the reason of it but I cannot fix it. I have this button: *<%= button_to 'Go to Gallery', loading_gallery_path, remote: true %>* And this is the controller function: *def galleryrespond_to do |for

[Rails] Re: Re: Re: Ruby on Rails Kgio segmentation fault

2014-05-06 Thread Karthik Sirasanagandla
Two things: 1. Add an echo to output the version of ruby used 2. Let the first/initialization command be to use the right version of ruby, say something like `rvm use ruby-2.x.x` Hope it helps! Cheers, Karthik On Tuesday, 6 May 2014 14:56:57 UTC+5:30, Ruby-Forum.com User wrote: > > > What is th

[Rails] Re: Re: Re: Ruby on Rails Kgio segmentation fault

2014-05-06 Thread Ed Ed
> What is the default PATH of the user that runs startup scripts? when I call echo $PATH there exist path to my ruby 2.1.0 bin -- 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 fro