similar to: Forms and regular expressions

Displaying 20 results from an estimated 20000 matches similar to: "Forms and regular expressions"

2006 Jul 13
6
Content_for_layout
Question- if I have more then one view I wish to display in a layout , how do I tell content_for_layout what to display and where ? TIA Stuart -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060713/a2d0a8c8/attachment.html
2006 Jun 14
13
Undefined method
I really hope this is not a bad question (as in he''s abusing the list). However I could use a little direction (even though I''m reading books, tutorials) Right now I''m getting a undefined method `category'' for 4:Fixnum The specific lines from the rhtml file are: <td><%= link_to position.category_id.category, :action => "show", :id =>
2006 Jun 12
3
Syntax errors on "insert into"
I''m digging around and googling but can''t seem to find what I think is a simple thing. All I''m trying to do is insert data in a migration into a table, using regular SQL statements. LIke this: class AddStateData < ActiveRecord::Migration def self.up INSERT INTO states values ('''',''Alaska''); INSERT INTO states values
2006 Aug 07
8
Login form question
I''m using Rails Recipes to create a login form but instead of username and password, my setup is firstname, lastname, password. I seemed to be gramatically challenged and not sure how to set up the parameter list. Can anyone offer up a suggestion. The book shows the method starting like: if request.post? user = User.find(:first, :conditions => [''username = ?'' ,
2006 Jun 17
4
Simple tutorial weirdness
Sorry - working on a simple tutorial but something is throwing me here. I''m supposed to get a Time.now() print to the page but it''s not working and I can''t figure out why. No errors are thrown my the page shows: Howdy, world! My name is Stuart Felenstein. This was verified at . So no time stamp showing. I went into IRB , did a Time.now() and it''s working
2006 Jun 09
18
Is IRB the ruby console ?
I''m running script/console but keep getting the message that irb.bat is not recognized as an internal or external command, operable program or batch file. If it means anything I am running instant rails. I can invoke irb straight forward. TIA Stuart -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Jun 13
2
Migration or model first
I sort of asked this the other day but with no replies. I''m new to rails btw. Question: Is there a preferred way to create migrations ? What I''ve noticed is if I create a model first , it sets up the skelton of the migration. If I create a migration file and then do the model it attempt to create a migration file and not overide the one already in place. It seems to make sense
2006 Aug 03
5
Rails - forms
Currently I have a registration form that is built like this: <label for="First name">First name</label> <%= text_field "user", "first_name" %><br> <label for="Last name">Last name</label> <%= text_field "user", "last_name" %><br> <label for="Email">Email</label>
2006 Jul 14
2
Question: SVN the down and dirty
So I have done a bit of svn''ing. I use RadRails as well so SVN is built in. Question though is I''m not sure exactly how it fits in my Ruby / Rails tree. I imagine I can create one directory, say called SVN and then within there all the sub directories for various svn repositories I might want to download / update from. But what I am not sure about and don''t want to
2006 Aug 08
11
Newb question- method not working
I know this shouldn''t be in the view but to test the code it is. Anyway if I do just session[user] I get back the user id (the id from the user table) which is good. However this code does not work. <% a = session[:user] %> <% uname = User.find(:first, :conditions => id = a) %> <%= @uname %> TIA Stuart
2006 Jul 16
3
OT: Radrails
Sorry, but I have tried signing up for the RadRails list and never can get a confirmation email. I think it may not exist. Anyway, I created a project using just cli, now I''m trying to import the project with no success. I choose the directory and radrails just sits there not enabling the okay button Sound familiar ? Maybe I''m doing something wrong. Stuart
2006 Jun 19
12
AWDWR- Question
I''m having a particularly difficult time undersanding one lesson from this book. This is in relation ot how one would grab "search" parameters from web forms to search for records in the database. I understand the :conditions part of find() but am confused on the code: 1- name = params[:name] pos = Order.find(:all, :conditions => ["name = ? and pay_type =
2006 Nov 13
9
Setting up Mongrel and Apache , some direction needed
I have a site that is PHP on Apache / RedHat , but will send requests to a subdomain (running Rails) for database operations. I believe the set up should be to have ROR using Mongrel, and an Apache virtual host passing requests from apache to mongrel. Does this sound correct ? I believe the Virtual Host is set up in Apache. One of my problems is I can''t find the httpd.conf file for
2006 Jun 13
11
Question: Migration - multiple creates
I want to create a migration file that creates multiple tables, so i''m guessing the correct format would be: Can anyone confirm ? I''m guessing that each new create script requires a seperate class so formatted this way. Perhaps I''m wrong. TIA Stuart class CreateTable1 < ActiveRecord::Migration def self.up create_table :table1s do |t| t.column :length,
2006 Jun 07
4
Question: coding protected methods
Apologies first, because I need to ramp up on Ruby and coding Ruby in Rails, however it''s my 3rd day with this beast :) so I''m asking : When I added protected methods to the model before it was like: protected method.................... end Would this be a valid way to write a protected method as well ?: attr_protected :column1, :column2 Perhaps this particular call
2006 Jun 08
19
Agile Web Dev (book) question: errors
This is kind of frustrating (but no doubt helpful in the long run) that after following along and coding , and d/l the code the same error is appearing. For those who are familiar with the depot app, I''ve run into a problem after fixing the cart to reflect quanitites. I worked through the intended error messages but now have this appearing: SyntaxError in StoreController#add_to_cart
2006 Jun 16
4
Form magic
Didn''t know what else to call this subject, sorry. Anyway this is more a general discovery question then a coding one. Is it possible (and I already know it should be) to create forms where depending on a particular choice in one select tag, one or another select tags would be presented in the form. As an example, a shopping site , where a dropdown has options of: 1-Men''s shoes
2006 Sep 15
7
OT: TinyMCE in Rails
I''m having a problem getting the text area the size I want it to be. In my view at the top I have this init calls <script type="text/javascript" > tinyMCE.init({ mode: "textareas", theme: ''advanced'', theme_advanced_toolbar_location: ''top'' }); </script> Then in my form: <%= text_area
2006 Jun 18
13
Currency calculation
I''m thinking of experimenting with some currency conversion. However, I''d like the conversions to be in synch with the current rates. Anyone know (and this maybe out in left field) if there is some online (perhaps xml) or other data stream I can connect with in my code to output values based on user selection ? TIA Stuart
2006 Jul 15
2
Migrations question
I started working on an app. It''s new at this point so backing up wouldn''t be difficult, however I''m wondering if there is some plugin that exists where I can use it to grab the current database (set up without migrations) and create a migration file ? Sort of grab a current snapshot of the database and use that as a stating point for my migrations directory. TIA Stuart