search for: joey__

Displaying 20 results from an estimated 40 matches for "joey__".

Did you mean: joey
2006 Apr 07
6
Magic Field Names - "position"
What does the Magic Field Name position do? I was looking here: http://wiki.rubyonrails.com/rails/pages/MagicFieldNames And unfortunately that documentation is incomplete. Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Mar 25
4
dynamic set_table_name for achives
How can I pass something to set_table_name so that I can switch tables on the fly for accessing archive data? If I could access sessions inside a model I would do something like: if @session[:current_period] set_table_name "statistics_" + @session[:archive_year] else set_table_name "statistics_" + Date.now.year end But since I cannot access the session from within a
2006 Jan 07
2
Before filter...
I have a before filter in my application.rb, for every action and controller it gets run, except for one action. How can I see whats going on? And why it doesnt get run? Thanks joey__ -- Posted via http://www.ruby-forum.com/.
2006 Mar 31
5
Changing Table Schema and Models
If I make a change to a database table, how do I recreate the model to reflect the change? -- Posted via http://www.ruby-forum.com/.
2006 Mar 25
3
Rails Plugins: Why to register your own functionality with send()?
Hi there, I have seen in the file column plugin ( http://www.kanthak.net/opensource/file_column/) from Sebastian Kanthak or David''s acts_as_taggable plugin that to register my functionality I need to do something like this: ApplicationHelper.send(:include, InPlaceEditAssociations) I am wondering why not: (a) module ApplicationHelper include InPlaceEditAssociatons end or: (b)
2006 Mar 12
2
Strange error: undefined method `rewrite''
Hi, when I generate a new rails project with a simple scaffolded controller, I get a strange error message, whenever it tries to call the url_for method, for example: ,---- | undefined method `rewrite'' for #<Url:0xb7675e64> | | Extracted source (around line #7): | | 4: </p> | 5: <% end %> | 6: | 7: <%= link_to ''Edit'', :action =>
2005 Dec 23
3
Intergrating delicious?
Whats the best way of intergrating del.icio.us into a RoR app? -- Posted via http://www.ruby-forum.com/.
2006 Mar 28
5
combining two models in one controller/view "set"
I''m going to take another stab at this question (my first one received no replies): I have two models: Author has_many: books Book has_one: author I have two tables: authors id ... books id author_id ... I let the scaffolding fly and it created the CRUD goodness for each model, as expected. However, I want to have only one view/controller "set" for both models; when I
2006 Feb 21
4
Models, Helpers, Modules, etc.
Hello, I am learning rails and ruby and I have some questions about how should I go about doing certain things. [1]Many of my models have some functionality which is common, and instead of duplicating it across models, I want to store it in a single file, and then import the file into the models. Should I do this using modules, and then store them in the `lib'' directory? What is the
2006 Apr 08
5
If-Else Conditionals in Views
I find myself doing the following quite a lot: <% if user %><%= user.name %><% else %>Anonymous<% end %> I know that if I dont care about an else I can just do: <%= user.name if user %> Is there any simpler way to handle the else? This is a simple example so it''s not really an issue.. but for more complicated tests this gets quite tedious. -- Posted
2006 Feb 26
3
simplify
Trying to use Eric''s help and Amy Hoy''s page of playing with auto_complete and decided that the script/console is the place to rapidly test. I have this feeling that CONCAT isn''t working for postgresql... c = find_by_sql(SELECT * FROM clients WHERE CONCAT (first_name,middle_initial,last_name) = "johnadams") ^ (irb):61:
2006 Feb 26
3
Rails Naming Conventions
DB field names: If I have a table that references 2 or more separate users from my users table, is there a recommended naming convention for this situation? In my case, I have 3 users associated with a record in my projects table: requester_user_id created_by updated_by I could name one of them "user_id", and then projects.user would work I guess, but wouldn''t work
2006 Jan 11
15
How to use custom url formats?
I''m new to Rails and am trying to use a field called "code" instead of "id" in my URLs. For example, assuming I''ve got a database of motorcycles makes where the codes are "Honda", "Yamaha", "Suzuki", and "Kawasaki", etc. To show the info about Honda I want to use this url: http://www.mysite.com/makes/honda/
2006 Apr 30
8
format numbers as words
Does anyone know if there is a function available which can format any entered number as words? eg: ''1234'' would be ''One Thousand Two Hundred and Thirty Four'' In the past, I would have said this is a tall order, but from what I''ve seen with playing with rails for a short time, I don''t know what to expect. :) Thanks for any help, Damien
2006 Mar 15
10
Scaffold with Foreign Key
I have two tables: ------------------------------ drop table if exists users; create table users ( id int not null auto_increment, username varchar(100) not null, password varchar(20) not null, firstname varchar(20) not null, lastname varchar(20) not null, primary key (id) ) TYPE = InnoDB; ------------------------------ drop table
2006 Apr 08
2
ToDo list examples?
Hi guys, im guessing if there?s around a ToDo list example with categories using actual code(1.x) cause every example i found its about 0.x and its hard battle against deprecated code, that way i can see the basic of rails and tables relatios. Regards ;) -- Posted via http://www.ruby-forum.com/.
2006 Mar 03
2
voice recording with ruby/ rails
hi all whats there in store of ruby/rails to support voice recording feature ? thanks rohit --------------------------------- Yahoo! Mail Use Photomail to share photos without annoying attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060303/44230a4b/attachment.html
2006 Mar 21
1
Any project for study?
Is there any project which was recommende for reading it''s source for studing rails? such as typo ? -- Posted via http://www.ruby-forum.com/.
2006 Mar 23
2
Way to iterate over each associtaion
Is there a way with ActiveRecord to get ahold of a collection containing each association? I want to write a rake task that will dump a model and all its related models to yaml. Thanks, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060323/abdf4305/attachment.html
2006 Mar 27
1
Naming Convemtion for Model????
Hi, In My database there is a table called "categories". Now what name should I specify for my model as per ruby naming convention? Is it "Category"??? Also is it possible to keep database table name singular instead of plural? Please tell me. Thanx in advance. Prash -- Posted via http://www.ruby-forum.com/.