search for: lucifron

Displaying 10 results from an estimated 10 matches for "lucifron".

2006 Mar 21
2
Validation to make sure associations don''t change?
I have a main form representing the model, let''s call that ''Order'', and a partial displaying its'' OrderLines. I use the bulk update methods to initialize model objects directly from form data, leaving validation of business logic to the model. As AR likes to write stuff before i do an explicit save, I wrap the whole update in a manual transaction. This works
2006 Mar 14
5
Best way to use partial rendering in global layout
I have a global layout in application.rhtml and I''d like to render a partial template within it. Currently, I have this: <%= render (:partial => ''side_nav'') %> but it seems to be looking in the controller specific view directory. What is the best way to do handle controller - global partial rendering? Wes -- Posted via http://www.ruby-forum.com/.
2006 Mar 13
7
Wilcard search
Hello, I''m writing a search function for my application, but I am unsure on how to search for all results that contain my search string; here''s what I''ve got: def search @products = Product.find(:all, :conditions => "date_available < now()", :conditions => [ "title ilike ?",
2006 Mar 21
13
"Remembering" link to redirect to after logging in
Hi, Suppose I have a resource such as http://localhost:3000/topsecret/data that requires the user to login first. What I did was make use of before_filter to check and see if the session variable is set with the logged in user''s id (similar to the example in "Agile Web Development with Rails"). However while the filtering function does work correctly in redirecting the
2006 Mar 30
1
flash, before_filter and redirect_to
I leave a notice in the flash and do a redirect from a before_filter. Can someone confirm that the first request after this, i.e. the page I redirect to, doesn''t/isn''t supposed to clear the flash? -- View this message in context: http://www.nabble.com/flash%2C-before_filter-and-redirect_to-t1367103.html#a3665933 Sent from the RubyOnRails Users forum at Nabble.com.
2006 Mar 07
6
fcgi dispatcher crashing
I''m trying to set deploy an app on apache2 with the fcgid module, but can''t seem to get anywhere. Things work fine with cgi, but when i switch to fcgi, i''m stuck with a ''503: Service Temporarily Unavailable''. There''s no error being logged anywhere, afaik. Trying to run dispatch.fcgi from the shell doesn''t work either. It bombs out,
2006 Mar 24
10
innodb vs myisam
Hi, I have been using myisam tables in mysql with rails because my client will soon want fulltext searchable content, however when I migrated my development db from schema.rb all of the tables generated were innodb. I understand that I can override this, but also like the transactions and foreign keys of innodb. So 2 questions really: 1. are transactions in activerecord dependent on innodb or do
2006 Apr 03
0
Changing the session id?
I''d like to change the session id on successful login as a measure against session hijacking. How do i go about this? -- View this message in context: http://www.nabble.com/Changing-the-session-id--t1385607.html#a3721674 Sent from the RubyOnRails Users forum at Nabble.com.
2006 Mar 02
1
Coding conventions (mostly AR)
I have the following tables: Users, Clients, Roles, Assignments(user_id, role_id, client_id) and Rights(controller, action). First of all, I''d like to know if hooking things up this way makes any sense. Could perhaps add a second join table between assignments and roles, but not sure that would add any value. What i''m really wondering about, though - is how to do things the
2006 Mar 13
0
(Nested) collection in a view
Say I have a model consisting of Order( has_many :order_lines) and OrderLine( belongs_to :order). What would be the ''rails way'' to create an order form? Know I could just say @order = Order.some_order, @lines = @order.order_lines, and use something like this..: order.rhtml: Order no: <%= @order.no %> Date <%= date_select "order", "date" %>