similar to: Rails 2.3 problem...

Displaying 20 results from an estimated 6000 matches similar to: "Rails 2.3 problem..."

2008 Apr 09
3
form_tag and form_for cause #protect_from_forgery errors
Hey All, I''m trying to do a simple form_for (and I also get it with form_tag) and I''m getting the following error: ActionView::TemplateError (No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store).) on line #2 of users/new.fbml.erb: 1: <h1>Welcome To Courses, Let''s Get
2007 Dec 01
3
Rails 2 problem with compute_public_path
I''m trying to migrate to Rails 2, but keep getting these errors all over the place: ActionView::TemplateError: wrong number of arguments (2 for 3) On line #61 of users/new.rhtml 58: <% if @captcha_error -%><div class="fieldWithErrors">< % end -%> 59: <table class="signup"><tr> 60: <td
2007 Dec 07
4
strange error on mock proxy
I''m banging my head over this really strange error in a view test when I run "rake spec". The weird thing is that I don''t get the error when I run the spec file by itself. Here is the spec (I know, fixtures are the devil): describe "/units/new.html.erb here" do fixtures :units, :accounts, :groups it_should_behave_like
2007 Nov 06
2
Why is this view spec failing?
I can''t figure out why I am getting a failure. It renders out fine in the browser. <h1>New member</h1> <%= error_messages_for :member %> <% form_for(:member, :url => members_path) do |f| %> <fieldset> <legend>Member Info</legend> <p><label for="member[first_name]">First Name:</label> <%=
2008 Jan 25
1
form error with datetime select
Hi, Im trying to build a form using: <% facebook_form_for(:task, at task,:url => create_task_path) do |f| %> Assign Task To: <%= fb_friend_selector %> <%=f.text_field :ttype, :label=> "Title"%> <%=f.datetime_select :duedate, :label=> "Due Date"%> <%=f.buttons "Add" %> <% end %> But im getting an
2006 Apr 18
1
''wrong number of arguments'' for text_field?
This is probably something very simple but I can''t seem to figure out why I keep getting the ''wrong number of arguments (1 for 2)'' error with the following code when I try to create a new record. If anyone can see what is going wrong here please help! new.rhtml ------------------------------------------------- ... <%= start_form_tag :action =>
2005 Nov 15
2
FormOptionsHelper select call failing
In Rails 0.14.3, I''m doing the following in a view: <%= select ''folder'', ''format'', [''a'', ''b'', ''c''] %> This line in is failing with: ActionView::TemplateError (too few arguments.) Am I calling select incorrectly? (Yes, the @folder object does exist, and does have an attribute
2008 Dec 20
3
undefined method `stories_path'
Hi, I recieve error "undefined method `stories_path'' for #<ActionView::Base:0x995b4ac>" when going to the view via site.com/stories/new The model is setup correctly, I can retrieve data from the db fine. I think it might be related to the helper but I have no idea where to start. It seems to think its failing on the first line of the view, i belive on the
2008 Jun 30
1
Help with form_for
Hello, I had an app running on RoR 1.1, now I''m migrating it to 2.1. In a view I have: <div id="user_management"> <fieldset> <legend>Please log in</legend> <% form_for(:user, :url => sessions_path) do |f| %> <p>Username: <span class="notice"><%= flash[:notice]%></ span></p>
2009 Nov 18
4
rails newbie : routing error
After much ado about the naming of model adn controllers... model : Expense controller : Expenses route : map.resources :expenses Here I am using mysql database and created a unique index, since db:migrated created an id object and made it as primary key. Now in the def create @expense = Expense.new(params[:expense]) if @expense.save flash[:viola] = ''New expense saved.. be
2004 Nov 20
0
Stack level too deep on Cygwin and on Debian / Colinux with 0.5.0 - 0.8.5 Beta gems
Hi, as it is not possible for me to use a sensible development environment to start with I have to use emulations. I use Cygwin on windows and also Colinux. (Colinux is really amazing cause it lets you run actual linux binaries und Windows.) So here is my problem, which by the way exists since Rails 0.5.0 I think. It was the reason I tried Colinux in the first place, cause the error first
2008 Sep 10
0
wrong number of arguments
I am a newbie at rails and can''t figure out the following problem. Can anyone help? I am running the following: Ruby version 1.8.6 (powerpc-darwin9.4.0) RubyGems version 1.2.0 Rails version 2.1.0 Active Record version 2.1.0 Action Pack version 2.1.0 Active Resource version 2.1.0 Action Mailer version 2.1.0 Active Support version 2.1.0 I created three models using the:
2008 Jul 23
0
Link_to_remote object missing
Hello, I''m in troubles trying to use ''link_to_remote'' on Rails 2.1. Having this page: <h4>Editing project</h4> <% form_for(:project, :url => project_path(@project), :html => { :method => :put }) do |f| %> <p> Name <%= f.text_field :name %> Date <%= calendar_date_select :project, :target_date, :time =>
2006 Nov 23
1
Select Tag not working in 1.2rc1
I''m getting the following error message under rc1: ActionView::TemplateError (wrong number of arguments (1 for 0)) on line #54 of app/views/admin/admin_index.rhtml: In my view (* = Line 54): <%=start_form_tag(:action=>"sales_by_author")%> *<%=select("author","id",@authors.collect {|a| [a.name,a.id]})%> <%=submit_tag("Go")%>
2013 Mar 24
5
Rails 4.0 has_many_through and fields_for
Hi all, I am trying to reproduce rails 3.2 behaviour with fields_for and nested attributes. class ControllerAction < ActiveRecord::Base has_many :interactions, dependent: :destroy has_many :roles, through: :interactions scope :controllers, lambda {|name| where("controller_name_id = ?", name)} scope :actions, lambda {|name| where("action_name_id =
2006 Feb 21
2
ActiveRecord before_ callbacks question
Hi! I need to set the primary key in a model and postgres table to something different than id. View Edit and such works in the scaffolded controller. However if I click in the controller below the list of data onto New then I get an error message like this: Showing app/views/admin/_form.rhtml where line #5 raised: undefined method `nr_before_type_cast'' for
2006 Dec 08
2
UJS plugin incompatible with RSpec?
Hi all, Anyone using UJS with RSpec? I have the following view spec: ---- edit_spec.rb context "accounts/edit" do fixtures :users setup do assigns[:user] = users(:consumer) end specify "should display the user info to edit" do render ''/accounts/edit'' end end ---- end that causes this exception: ---- exception ActionView::TemplateError
2005 Mar 12
0
scaffolding issue
i''ve got a little rails app i''m messing with the schema is create table timedatevalidates ( id serial, timedatetovalidate timestamp, primary key (id) ); the mvc was initialized using rails scripts/generate scaffold timedatevalidate i''ve got this in a subdir of webroot and have modified .htaccess and config/routes.rb like so .htaccess :
2007 Nov 20
3
How to test views with Nested Resources and Partials
Hi everyone, I am relatively new to rspec and I am running into a wall in testing my views. I have a RESTful resource Contracts with a nested resource of Line_items. I am trying to figure out how to test the "edit" form of the Line_items. What complicates this is the nested routing and how to account for it, and that there is a partial form (_form.haml) that both the edit.haml and
2009 Dec 24
4
NoMethodError
Hi, In a few words, can someone explain to me the NoMethodError. Googling for answers will get you to something but a direct answer from experts will give you something. NoMethodError in Book#new Showing app/views/book/new.html.erb where line #4 raised: undefined method `title'' for #<Book id: nil, created_at: nil, updated_at: nil> Extracted source (around line #4): 1: