similar to: controller methods for app/views/A/B.rhtml

Displaying 20 results from an estimated 10000 matches similar to: "controller methods for app/views/A/B.rhtml"

2006 Aug 09
7
changing find method
Hi, i was wondering if there was a nice clean way(after all, it is ruby) to change the find method of a certain model/class (Page) so that if i wanted to use a find method on a @page instance it would return only specific rows from the table(if the page.published == true/false: the pages table looked like SQL: ... id int not null auto_increment, published tinyint(1) not null, something
2006 Jul 02
18
JOIN conditions
Hi, how can I get Rails to generate SQL queries with conditions in the JOIN clause? What I would want is: SELECT * FROM people p LEFT OUTER JOIN jobs j (p.job_id = j.id AND j.salary > 9999999) I tried People.find(:all, :include => ''jobs'', :conditions => ''jobs.salary > 9999999'') but that generates SELECT * FROM people p LEFT OUTER
2006 Jul 28
7
auto_complete_for exists but not being found by Rails
Anybody encounter this. I know the method exists in the auto_complete.rb file in my rails installation, but it itsnt accessing it throught he program. Any ideas? -- Posted via http://www.ruby-forum.com/.
2006 Aug 17
3
file_column plugin + rails 1.1.6
Hello, I need to install file_column plugin but I got an error message. This is the command I use: ./script/plugin install http://opensvn.csie.org/rails_file_column/plugins/file_column/trunk This is the error: Cannot find gem for Rails =1.1.4: Install the missing gem with ''gem install -v=1.1.4 rails'', or change environment.rb to define RAILS_GEM_VERSION with your
2006 Jan 05
2
Rails Newb: Foreign Key Views?
I''m a total rails newbie, but I''m learning fast. I have a question that I can''t seem to find an answer for: What is the best way of coding views that represent foreign key relationships? For example, while developing, I''ve created an "articles" table. I create some scaffolding code and modify it all to look nice. I then realise, I need an
2006 Jun 02
1
controller instance methods available in rhtml?
In rhtml, you have access to controller. I am trying to set an instance var in my controller, then retrieve it in my form display. I know I could do this through one of the hashes I have access to, but I''m trying to understand why I can''t do it this way. No matter what, when I try to output from my rhtml either <%= controller.whynot || ''Unknown'' %> or
2006 Jul 11
1
smpt server
Hi, i am now in the process of building a newsletter system which will send out emails to users that have enlisted to a certain group; everything''s going fine, and i an towards the end of this project...now the real part of the story kicks in, where i need to check to see if the thing is working or not. i have been looking over the development.log file, and i see that the emails
2006 Jul 05
8
loginGenerator - getting logged in username
i am working on a site taht uses loginGenerator.. it''s a great little package, but i am running into one little problem.. i would like to have something that says: "logged in as <username>" in the site, but i am not quite getting it.. what i am using is: <p>You are logged in as: <%= @session[:user] %> but i have tried: <p>You are logged in as:
2005 Apr 27
2
noob question: rhtml new/edit views and the date functionality
Hello All, I''ve been playing with Rails - did the recipe/category sample from onLamp.com - fairly straight forward - even got it working against postgres. Anyway, I''ve been appling rails to a small test project and I can''t seem to get the syntax down or find a sample of how to use the date control on a custom new/edit view. The CRUD (is that right?) that automatically
2006 Aug 13
5
problems with file_column plugin
1) installation is not as smooth as some other plug-ins. If you follow the instructions on http://www.kanthak.net/opensource/file_column/ it makes a directory called trunk instead of file_column. You have to manually rename it to file_column. I guess this is a minor annoyance but it gives me the feeling that things aren''t quite like other plugins. 2) I get this error: undefined
2006 Jul 03
6
help!
Hi, i''m fairly new to ruby on rails, and i know the question at hand may seem simple at first, but i''m getting really caught up in trying to understand this and the docs aren''t giving me answer. i actually thought i knew how the sql commands work (like :include, :conditions, :etc) but obviously, i don''t. there are three models M1, M2, M3 joined by a habtam
2006 Apr 26
3
Setting focus in a rhtml view
How do I set focus on a specific form field when I render a partial from the controller? I can do it with page[''name''].focus from an RJS view, but I can''t figure out how to do it when rendering this rhtml partial from the controller. I''m rendering a partial with two fields and neither one has focus until I hit the tab key or put the cursor in a field with the
2005 Dec 15
2
.rhtml in the model rather than the controller
Hi, I''m developing a mini-programming language for research surveys. [code] question S1 { label: The first few questions are just to help us categorize you. label: Do you or does any member in your household work for... (MARK ONE ONLY FOR EACH.) grid { col { 1 Yes 2 No } row { 1 An advertising agency 2 A public relations company 3 A marketing research firm or
2006 Jul 11
4
smtp server
Hi, i am now in the process of building a newsletter system which will send out emails to users that have enlisted to a certain group; everything''s going fine, and i an towards the end of this project...now the real part of the story kicks in, where i need to check to see if the thing is working or not. i have been looking over the development.log file, and i see that the emails
2006 Aug 13
5
Newbie question: scaffold not working
I went through a tutorial at http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1 to get started with RoR. I really like the idea of the scaffold construct, but I can''t seem to get it to work the way it was described in the tutorial. I''ve got a mysql database that is properly configured, and a table called ''quotes'' with a column called
2007 May 23
8
Rails Rendering diagnostics.rhtml in Controller Spec
Forgive me if this isn''t the proper list. It''s specific to the rSpec Rails plugin. The problem is, some controller actions are rendering the "diagnostics.rhtml" template when I''m expecting it to render something else in a controller spec. I''m assuming this is the template that displays the error message and a stack trace when an error is raised in the
2008 Jul 02
4
Wrapping a table row in <div> tags
Hi, Hopefully a quick example will illustrate what I''m trying to do. <table> <tr> <td>test</td> <td>test</td> </tr> <tr> <td>row 2</td> <td>row 2</td> </tr> <tr> <td>row 3</td> <td>row 3</td> </tr> </table> Using AJAX, I''d
2006 Jul 20
2
Why is my rxml view being wrapped by the rhtml template in views/layouts?
Why is my rxml view being wrapped by the rhtml template in views/ layouts? I was experimenting with REST, I had a nice little test program with one table: ''resources''. Here''s what the show method looks like: def show @resource = Resource.find(params[:id]) respond_to do |accepts| accepts.html accepts.xml end end I have a show.rhtml
2006 Apr 19
3
include contents of one rhtml in another
Hi I have a rhtml documment in views/account/login.rhtml I want to include the contents of login.rhtml in views/welcome/index.rhtml any suggestions on how this can be done? Thanks Scott -- Posted via http://www.ruby-forum.com/.
2007 Mar 20
4
rhtml plugin needed
Hi ! Is there any rhtml plugins for Eclipse ( or ) Radrails editors ? Pls , suggest 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To