similar to: How can I access the value of params[:tags] in my validate function?

Displaying 20 results from an estimated 7000 matches similar to: "How can I access the value of params[:tags] in my validate function?"

2006 Feb 06
9
tests fine, but fail under rake
Hi there, So I have an odd error at the moment that only occurs when I run tests via rake. It''s happening with two tests now. Under a simple ruby run, the tests are fine, e.g.: D:\User\Code\ruby\prometheus>ruby test\functional\story_comments_controller_test .rb Loaded suite test/functional/story_comments_controller_test Started ......... Finished in 2.37 seconds. 9 tests, 65
2006 Jul 20
5
How can I make has_many prevent a delete that would lead to orphans?
e.g. class Asset < ActiveRecord::Base validates_presence_of :asset_number, :make, :model, :location, :name, :serial_number validates_numericality_of :asset_number validates_uniqueness_of :asset_number belongs_to :user belongs_to :location belongs_to :asset_type, :foreign_key => ''type_id'' end class Location < ActiveRecord::Base validates_presence_of :name
2010 Dec 20
2
package "arules" - 'transpose' of the transactions
Suppose this is my list of transactions: set.seed(200) tran=random.transactions(100,3) inspect(tran) items transactionID 1 {item80} trans1 2 {item8, item20} trans2 3 {item28} trans3 I want to get the 'transpose' of the data, i.e. transactionID items 1 {trans2} item8 2 {trans2} item20 3 {trans3} item28 4 {trans1} item80 I
2011 Feb 14
4
sem problem - did not converge
Someone can help me? I tried several things and always don't converge # Model library(sem) dados40.cov <- cov(dados40,method="spearman") model.dados40 <- specify.model() F1 -> Item11, lam11, NA F1 -> Item31, lam31, NA F1 -> Item36, lam36, NA F1 -> Item54, lam54, NA F1 -> Item63, lam63, NA F1 -> Item65, lam55, NA F1 -> Item67, lam67, NA F1 ->
2013 Apr 16
1
Path Diagram
Hi All, Apologies if this has been answered somewhere else, but I have been searching for an answer all day and not been able to find one. I am trying to plot a path diagram for a CFA I have run, I have installed Rgraphviz and run the following: pathDiagram(cfa, min.rank='item1, item2, item3, item4, item5, item6, item7, item8, item9, item10, item11, item12', max.rank='SMP,
2009 Sep 01
11
Storing puppet info in a database
Hi all. We have a bunch of RHEL servers running Puppet. They are also connected to our Red Hat Satellite server. Currently we don''t have any master documentation system that stores all relevant information (i.e. type of server, hardware info, linux configuration, etc) about the servers. So what I''d like to do is implement some sort of system that can hold all this information.
2006 Apr 11
26
Firefox won''t let me send ''&'' with AJAX!
Hi everyone, I''ve encountered a HUGE problem, which may not be RoR-oriented, but there might be a workaround somehow. See, at this moment, I''m unable to send AJAX requests back and forth when the information contains an ampersand (''&''). In essence, request is never completed. The odd thing is that it only happens with Firefox (IE and Opera works fine).
2010 Feb 08
5
Why are double sided polymorphic relationships lacking in Rails?
http://stackoverflow.com/questions/2224994/why-are-double-sided-polymorphic-relationships-lacking-in-rails -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2005 Dec 23
6
Stories with many tags, tags with many stories, has_and_belongs_to_many howto?
Hi, I began experimenting with habtm relationships, and so I created a stories table, a tags table, and a stories_tags table referencing the former 2. When I create a "story", I want to add several tags to it. Then, the model should create those tags and link them to the respective stories, and for the tags that already exists, just link them to the story. I tried something like
2007 May 21
4
Just upgraded to 1.0.0, should render_text isn''t working for me
I finally got around to upgrading from 0.8.2 (!!). I had a spec which looked like specify "should render abc123" do controller.should_render :text => "abc123" get :key end With 1.0.0, the new spec is it "should render abc123" do get :key response.should render_text("abc123") end However it doesn''t work, giving me the error: undefined
2005 May 17
5
Strings, Variables and GetText
Hi, I''m starting to use GetText and have this code: render_text %(<script language="JavaScript" type="text/javascript"> parent.mainframe.onUpdateNew("Gallery <b>#{@media.name}</b> was successfully created.", "#{@media.name}","#{String(@media.id)}","#{@media.media_type}"); </script>) I need to convert
2007 Nov 05
3
link_to & others really necessary?
One of the areas where I think Rails goes too far is in many of the helpers that (AFAICT) do nothing more than change the syntax used to write simple HTML tags. link_to and many of the form tags come to mind. For me, these helpers aren''t that helpful. I find the HTML much clearer to write and read, I don''t see any added value in the overhead costs of using code to
2006 Apr 06
9
How to get Form values in RubyOnRails
Hi I want the FORM values on my controller.i.e. I want the values of login_loginname(Form variable) and login_password(Form variable) on login_controller.rb How can i do that? Table Name is: logins Model:: Login.rb Controller:: login_controller.rb Below is my test form loginname password Hoping for reply Regards Parikshit
2007 Sep 29
2
REXML - XML query only returning one (last) result
I''m really new to Ruby on Rails, and I''m trying to read an XML file with REXML. No matter what I try, I am only getting the last result returned from my query. I should be getting 365 results. Here is the code: include REXML require ''rexml/document'' require ''rexml/xpath'' class MakeFootprintController < ApplicationController def index
2005 Dec 26
3
probably a very dumb question
why does <%= render_text "hey ya" %> cause ''undefined method `render_text'' for #<#<Class:0x3851120>:0x3851000>'' can i use render text in a template? -- Posted via http://www.ruby-forum.com/.
2012 Mar 20
4
Multiple Paperclip Images on Index
Hi, I am working on a project that is using Paperclip to upload multiple images to an Asset model. my Post model has_many Assets. As per this tutorial/screencast... https://github.com/Emerson/Multiple-File-Uploads-with-Paperclip-and-Rails-3/blob/master/app/views/posts/show.html.erb"> http://www.emersonlackey.com/article/paperclip-with-rails-3> This all works fine and I can
2009 Jul 20
2
render :file in another window
is there a way to render a file in another window I wrote : def show @asset = Asset.find(params[:id]) respond_to do |format| format.html format.xml { render :xml => @asset } format.pdf {render :file => @asset.data.path } end end this render in the current window.... thanks for your suggestions erwin
2006 Mar 14
6
How to provide 2 actions to a form?
Hi, I have a form in rhtml. Now I have 2 buttons indside that form. Clicking on the first button action will be ''create'' & on second button action will be ''delete''. How to do this? Thanx Prash -- Posted via http://www.ruby-forum.com/.
2006 Apr 03
9
Problem with Windows not finding methods
I am running (testing) a noob-tube for myself as follows: Windows XP SP2 lighty ruby 1.8.x rails 1.1 scgi I have everything working fairly well, but with one minor exception: the actions that I have defined as follows are not found. class MytestController < ApplicationController def index render_text "Hello Nurse!" end def dilbert render_text "Dilbert
2006 Apr 12
1
Link helpers and AJAX callbacks
Hi, So after lots of efforts to understand Ruby and Rails, I am finally scratching the surface of AJAX in Rails. So here goes another problem. I am able to sucessfully call server side method using AJAX. Now I need to fill this function with something useful to return back. Now I see that only inbuilt function I can play with is "render_text". This means it simply doesn''t