[Rails] Trying to show 3 tables in 1 view

2013-02-15 Thread Jax
Hi All, I'm pretty new to ROR. I got 3 tables: Team, with columns name, world_ranking, star_player and img_url Result with columns round, score and team_name Player with columns first_name, last_name, position and player_number my models relationships look like this class Team

[Rails] Ruby on Rails new bee( Need help)

2013-02-15 Thread sups
Hi Helpers, I am new to Ruby in Rails and I have difficulty it passing the instance varaibles to the view. Earlier I was reading the values from the table directly in the view. Now I want to do that part in controller below is my code before changes view %=

[Rails] Re: Trying to show 3 tables in 1 view

2013-02-15 Thread Lorenz Blackbird
In the index view of team write the code of index view of player and select only the team players by @team.player: table tr thName/th thPosition/th thNumber/th /tr % @team.players.each do |team_player| % tr td%= team_player.first_name % %= team_player.last_name %/td

[Rails] Select and inner join

2013-02-15 Thread Lorenz Blackbird
I have a many-to-many relationship in my course model in this way: has_many :course_paragraphs has_many :paragraphs, :through = :course_paragraphs I use an inner join to select the paragraphs of my course: Paragraph.joins(:course_paragraphs = :course)

[Rails] Re: Weird Error when Adding ShareThis Hovering Buttons to Rails

2013-02-15 Thread Yahya Poonawala
The problem is with the domain name as loader.js tries to do a split on the domain name. So if you are hitting the page localhost:3000 which has the sharethis widget it will not show up as it cannot split localhost. However if you map your machine(127.0.0.1) to something like a.b then

Re: [Rails] Running Rails App Via Passenger

2013-02-15 Thread Jim
On Thursday, February 14, 2013 5:31:38 PM UTC-5, Nick Apperley wrote: Managed to access the website by adding *Listen 1025* to the Apache config file, and adding an entry to the hosts file. Have used a different port for the website (in its VirtualHost entry). Port 80 is already taken by

Re: [Rails] Select and inner join

2013-02-15 Thread Colin Law
On 15 February 2013 10:05, Lorenz Blackbird li...@ruby-forum.com wrote: I have a many-to-many relationship in my course model in this way: has_many :course_paragraphs has_many :paragraphs, :through = :course_paragraphs I use an inner join to select the paragraphs of my course:

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

2013-02-15 Thread Guirec Corbel
I have a technical problem. I will fix it today. Sorry for inconvenience. Le 2013-02-14 08:33, Scott Eisenberg a écrit : It's a good idea. Will try it. Keep pushing the feature set! On Feb 14, 2013, at 7:52 AM, Guirec Corbel guirec.cor...@gmail.com mailto:guirec.cor...@gmail.com wrote:

Re: [Rails] Running Rails App Via Passenger

2013-02-15 Thread Hassan Schroeder
On Fri, Feb 15, 2013 at 6:41 AM, Jim jim...@gmail.com wrote: You can serve multiple sites from the same IP address and port if Apache is set up correctly. Or you can eliminate a whole lot of configuration nonsense by using Pow (http://pow.cx/) for development :-) and simply access your app

[Rails] Re: Select and inner join

2013-02-15 Thread Lorenz Blackbird
Colin Law wrote in post #1097096: Paragraph.joins(:course_paragraphs = :course) .where('course_paragraphs.course_id' = @course.id) You don't need to do that. If you have a course in @course then its paragraphs are just @course.paragraphs. It is rare to have to use joins when

[Rails] Re: Ruby on Rails new bee( Need help)

2013-02-15 Thread Robert Walker
sups wrote in post #1097037: Hi Helpers, I am new to Ruby in Rails and I have difficulty it passing the instance varaibles to the view. Earlier I was reading the values from the table directly in the view. Now I want to do that part in controller below is my code before

Re: [Rails] Select and inner join

2013-02-15 Thread Rob Biedenharn
On Feb 15, 2013, at 10:12 AM, Colin Law wrote: On 15 February 2013 10:05, Lorenz Blackbird li...@ruby-forum.com wrote: I have a many-to-many relationship in my course model in this way: has_many :course_paragraphs has_many :paragraphs, :through = :course_paragraphs I use an inner join

[Rails] Re: What's wrong with my spec? (StackOverflow Question)

2013-02-15 Thread andreo
I have answered you in there. On Sunday, 10 February 2013 09:07:17 UTC+1, Gjaldon wrote: Hi all, I just posted a question on SO and it would be great if you guys could help out.

[Rails] Re: What's wrong with my spec? (StackOverflow Question)

2013-02-15 Thread andreo
I have answered you in there. On Sunday, 10 February 2013 09:07:17 UTC+1, Gjaldon wrote: Hi all, I just posted a question on SO and it would be great if you guys could help out.

[Rails] Re: boolean? Emit Yes or No, not true or false

2013-02-15 Thread Peter Ehrlich
Found via google. I made a quick script for this. Sorry for reviving.. class TrueClass def to_s(style = :boolean) case style when :word then 'yes' when :Word then 'Yes' when :number then '1' else 'true' end end end class FalseClass def to_s(style =

[Rails] structured data without database?

2013-02-15 Thread xscr...@gmail.com
I am building a small website. I want to have a scrolling window of news headlines, where you click on the headline and a page with a copy of the press release get s displayed. I don't want to run a db, so is there anyway to predefine the relationships between headline and the text file?

Re: [Rails] structured data without database?

2013-02-15 Thread tamouse mailing lists
On Fri, Feb 15, 2013 at 8:13 PM, xscr...@gmail.com xscr...@gmail.com wrote: I am building a small website. I want to have a scrolling window of news headlines, where you click on the headline and a page with a copy of the press release get s displayed. I don't want to run a db, so is there

[Rails] How to catch 'missingtitle' error for media_wiki gem(Stackoverflow Question)

2013-02-15 Thread prateek papriwal
Hi, I have posted a question on SO. It would be great if anyone could help me out. http://stackoverflow.com/questions/14907316/how-to-catch-missingtitle-error-for-media-wiki-gem -- Thanks and Regards Prateek Papriwal B.Tech, Electrical IIT Delhi -- You received this message because you are