[Rails] Re: Select and inner join

2013-02-17 Thread Lorenz Blackbird
@p_ids = @course.paragraph_ids This solution works fine! Too simple for a C programmer like me :) Pluck gave me the same MySQL error. Thanks at all for the help. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on R

[Rails] Error on installation of Ruby On Rails on QNAP TS809U-RP [Linux]

2013-02-17 Thread Wayne L.
I am not sure where I should even begin troubleshooting this. I know a little bit about Linux and am comfortable editing files and running commands however definitely not a Linux guru. I have ipkg already installed on the QNAP. I know absolutely nothing about ruby on rails. Thanks for any help.

Re: [Rails] Simple refactor?

2013-02-17 Thread botp
On Mon, Feb 18, 2013 at 12:02 PM, tamouse mailing lists < tamouse.li...@gmail.com> wrote: > On Sun, Feb 17, 2013 at 7:16 PM, Rogerio Medeiros > wrote: > > > [:subject_id, :book_id, :chapter_id, :section_id, :subsection_id, > > :minisection_id].each do |k| > > "@#{k.to_s}" = session[k] if session

Re: [Rails] Simple refactor?

2013-02-17 Thread tamouse mailing lists
On Sun, Feb 17, 2013 at 7:16 PM, Rogerio Medeiros wrote: > [:subject_id, :book_id, :chapter_id, :section_id, :subsection_id, > :minisection_id].each do |k| > "@#{k.to_s}" = session[k] if session[k].present? Sorry -- really not sure what's supposed to be happening here -- you're assigning to a s

Re: [Rails] Social-Reviewing : new project for developpers to discuss about code

2013-02-17 Thread tamouse mailing lists
On Sun, Feb 17, 2013 at 8:01 PM, Guirec Corbel wrote: > My application finaly works : http://www.social-reviewing.com/. Yay! It's a good looking site, seems well laid out and the functionality isn't opaque as with some other social sites (FB I'm lookin' at you >.>). > I forgot to give the link

Re: [Rails] Social-Reviewing : new project for developpers to discuss about code

2013-02-17 Thread Guirec Corbel
Hello, My application finaly works : http://www.social-reviewing.com/. I forgot to give the link to the first article : http://www.social-reviewing.com/en/projects/12-social-reviewing/actualities/2-refactoring-controllers-specs. Ouf... it wasn't easy to solve. Bye! Le 2013-02-15 10:51, Gui

Re: [Rails] Simple refactor?

2013-02-17 Thread Rogerio Medeiros
or @subject_id = session[:subject_id] if session[:subject_id].present? @book_id = session[:book_id] if session[:book_id].present? @chapter_id = session[:chapter_id] if session[:chapter_id].present? @section_id = session[:section_id] if session[:section_id].present? @subsection_id = session[:subsect

Re: [Rails] Simple refactor?

2013-02-17 Thread Rogerio Medeiros
try [:subject_id, :book_id, :chapter_id, :section_id, :subsection_id, :minisection_id].each do |k| "@#{k.to_s}" = session[k] if session[k].present? end 2013/2/17 Dave Castellano > Hi, > > As I continue learning to program, I am finding things I think can > probably be done in a better way. T

[Rails] Simple refactor?

2013-02-17 Thread Dave Castellano
Hi, As I continue learning to program, I am finding things I think can probably be done in a better way. The following code seems like something programmers must run into all the time and I am wondering if there is a better way to write the code in this situation (it seems very repetitive to me).

[Rails] Re: Where do Gems Live (e.g. CKEditor)

2013-02-17 Thread Jonathon M.
Colin Law wrote in post #1097417: > On 17 February 2013 09:25, Jonathon M. wrote: >> I'm a Rails newbie and I have added the CKEditor Gem which is working >> okay. To configure the gem though, you have to edit the config file, >> which is also working when I do that. However, when I push to github

Re: [Rails] Where do Gems Live (e.g. CKEditor)

2013-02-17 Thread Colin Law
On 17 February 2013 09:25, Jonathon M. wrote: > I'm a Rails newbie and I have added the CKEditor Gem which is working > okay. To configure the gem though, you have to edit the config file, > which is also working when I do that. However, when I push to github and > pull to my other computer, the c

[Rails] Re: Suggestions for my first serious Ruby on Rails project

2013-02-17 Thread Jim
I would do just like I've done for automated tasks in several other Rails apps I've written: make a rake task for it which can be triggered via cron job. The rake task can simply trigger a model method to do whatever needs done. This keeps all code relevant to the app in the application (and m

Re: [Rails] Re: Where do Gems Live (e.g. CKEditor)

2013-02-17 Thread Javier Quarite
On Sun, Feb 17, 2013 at 9:44 AM, Jonathon M. wrote: > > Yes, I'm using rvm. So the CKeditor gem will be there. If I want to > modify the gem and have that modification passed to my deployed site do > I need to move it to within my assets (or whatever)? I ask because > otherwise when I run bundle

[Rails] Re: Where do Gems Live (e.g. CKEditor)

2013-02-17 Thread Jonathon M.
Javier Quarite wrote in post #1097393: > On Sun, Feb 17, 2013 at 4:25 AM, Jonathon M. > wrote: > >> I'm a Rails newbie and I have added the CKEditor Gem which is working >> okay. To configure the gem though, you have to edit the config file, >> which is also working when I do that. However, when I

Re: [Rails] Serving HAML assets outside of controllers

2013-02-17 Thread Flavio Silva
Jayme, that's exactly what I'm looking for right now. Well it's been more than a year since you've posted the issue so have you succeeded? I want to use Slim template files inside app/assets/templates folder. I'm implementing the front-end of an app using AngularJS. The Slim file is indeed loade

Re: [Rails] Where do Gems Live (e.g. CKEditor)

2013-02-17 Thread Javier Quarite
On Sun, Feb 17, 2013 at 4:25 AM, Jonathon M. wrote: > I'm a Rails newbie and I have added the CKEditor Gem which is working > okay. To configure the gem though, you have to edit the config file, > which is also working when I do that. However, when I push to github and > pull to my other computer

[Rails] Re: Twitter bootstrap rails gem not working in production mode

2013-02-17 Thread Werner
Hi.. my application.js //= require jquery //= require jquery_ujs //= require jquery-ui //= require bootstrap //= require_tree . my application.css.scss application.css$iconSpritePath: image-path('glyphicons-halflings.png'); $iconWhiteSpritePath: image-path('glyphicons-halflings-white.png'); @im

[Rails] Where do Gems Live (e.g. CKEditor)

2013-02-17 Thread Jonathon M.
I'm a Rails newbie and I have added the CKEditor Gem which is working okay. To configure the gem though, you have to edit the config file, which is also working when I do that. However, when I push to github and pull to my other computer, the config file is not changed. This lead me to the followi