search for: murrayst

Displaying 20 results from an estimated 35 matches for "murrayst".

Did you mean: murray
2006 Mar 04
7
Get ID after save
This is simple (I am sure) but how do you get the id of the inserted element after the element has been save? I thought it was something like this: @product = Product.new(params[:product] if @product.save add_image(product.id, params["image"]) flash[:notice] = ''Product was successfully created.'' redirect_to :action => ''list_products'' end
2006 Feb 17
4
Why doesn''t this work!
I have this in my controller... @tech_standards = TechStandard.find_by_sql("SELECT * FROM tech_standards WHERE subpoint <> 0") Everything is fine except when I look at my view I still get supoints that are 0. When I run this query in my query browser I don''t. View: <select name="resource[tech_standard]" id="tech_standard">
2006 Feb 21
7
Validation issues
I have a form. Everything submits into the database if I don''t have any validation rules. When I put these rules: validates_uniqueness_of :title, :message => "already exists in database" validates_presence_of :title I get this error (which seems weird because I am not validating against that): You have a nil object when you didn''t expect it! You
2006 Mar 01
2
Help with Many-To-Many insert
I am having issues with a many-to-many table. The table relates resources to standards, but in my resources table has one-to-many relationships so those also appear in my many-to-many table. I am trying to insert into the table via: @resource.core_contents << CoreContent.find(params[:core_content_ids]) But I get this error: Mysql::Error: Duplicate entry
2006 Mar 16
3
ACLSystem and session variables
I am using the ACL System that is described on the Rails wiki and I have a quick question. I want to set the "role" as a session variable so that I can display certain navigation schemes and I was doing it like this: @session[:user][:role] = @user.roles When I print out this variable I get: #<Role:0x3262d80> How can I turn this into a readable value? I tried .to_i
2006 May 30
4
Hide parent element
I have some code that calls a partial to display one or more blocks within a div tag. I want to have a close button (or cancel link) that will fade that block but leave the others. Here is the code: LINK: <%= link_to_remote "Add Miscellaneous Link", :url => { :action => :add_iyc_link } %> add_iyc_link.rjs: page.insert_html :bottom, ''links'', :partial
2006 Apr 10
2
Fix log files
What is the code I include in one of my files so that my log files are easier to read? I am using Windows. Thanks. Seth -- Posted via http://www.ruby-forum.com/.
2006 Mar 10
3
installing rails 1.0 on Windows
I ran the gem installer and it seemed to work, but i believe i''m still using an older version. How can i tell what version I''m really using? Thansk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060310/435006b0/attachment.html
2006 Feb 21
4
Error, got String?
I am getting this error. ActiveRecord::AssociationTypeMismatch in Resources#create Focus expected, got String I have a select menu named resource[focus]. My focus (belongs_to :resources) table has a one-to-many relationship with the resources (has_one :focus) table (A resource will have only one focus but one focus will have many resources). I assume this error means that the focus is
2012 Sep 10
1
chainbooting pxe servers stalls
I've started using pxe servers for OS deployment at my organization and I'm trying to get chainbooting working but I seem to run into an issue that causes a hard lock up of a system. MENU BEGIN ^1. Boot Satellite PXE LABEL Satellite PXE KERNEL pxechain.com APPEND (Server IP Address)::pxelinux.0 Is part of my config file for my main pxe server to boot over to the
2006 May 04
7
windows / migration issues
Running latest rails, etc on windows xp. I can''t use "rake migrate" to migrate to latest version. I NEED to specify, i.e. "rake migrate VERSION=11" for things to work consistently. plain ''ol "rake migrate" never makes it to the latest version. no errors, she just stops short of the latest version. hasn''t been a problem until now --
2006 Mar 17
7
OT: Subversion folder cleanup
How do you clean up your app folder to place onto the server? I want to get rid of all the .svn stuff. Seth Buntin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060317/cc81d9f7/attachment.html
2006 Jun 13
2
Using Modules
I have setup my application so that the "admin" area is a module (app/worm/ -> admin area) and the "site" area is in the app/ folder. When I try to submit a basic form to the database it says: This error occured while loading the following files: worm/in_your_classroom_link.rb Which I think this means is that it is looking for a worm module in my models folder. Why
2006 Jun 14
1
Loop to insert into database
I have a form that will display a brief description of a topic and provide links (1 to many) for that topic. So I currently have two tables Articles and Links. I also some stuff on the form that will add links to the form so that you can create as many was you would like. The problem I am having is finding out how to submit each link to the databasen and aligning those links to the
2006 Jun 22
3
Compare against array
I have a database field called file_type. I want to compare it against an array of types to either display it as an image or just create a link to it. I am sure there is an easy way to do this but I can''t think of it. I don''t want to do this: <% if resource.file_type == ".png" OR resource.file_type == ".jpg" ... %> I would like to do: <% if
2006 Apr 10
0
Issue with session variables
I had (at one time) got this thing working but it doesnt'' seem to work any more. I am trying to display a specific user menu depending on the session variable. Here is what I have: <% for @role in @session[:user][:role] %> <% if @role.role_id == ''1'' %> <li><% link_to "Create Resource", :controller =>
2006 Mar 01
1
Accessing AJAX''ed elements via javascript
Is there a way to get access (via javascript) the page elements that were populated with AJAX (observe_field)? If you look at my source I have: <select name="resource[sub_focus_id]" id="resource_sub_focus_id"></select> But the actual select menu is filled with options because I used the observe_field to fill in the options. Now I want to be able to access
2006 Mar 02
0
Help with this comparison and loop
I am sending this information: <%= observe_field "resource_focus_id", :frequency => 0.25, :url => { :action => :add_sub_focus}, :with => "''focus_id=''+ value + ''&sf_id=#{@resource.sub_focus_id}''", :update => "resource_sub_focus_id" %> Which turns out to be:
2006 Mar 02
0
Select from Many to Many
Here is what I have: add_core_content.rhtml: <select id="resource_core_content_ids" name="resource[core_content_ids][]" size="15" style="width: 200px;" multiple="multiple"> <% @core_contents.each do |c| %> <option value="<%= c.id %>" <% if @resource.core_contents.include? (c) %>
2006 Mar 07
0
Gems
I am setting up a development box and would like to know what gems are essential to have installed? What gems TextDrive has installed if anyone uses that service? Seth Buntin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060307/4afe49ba/attachment.html