Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6033263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:27:30+00:00 2026-05-23T05:27:30+00:00

I am trying to edit my events model. Here is what I have for

  • 0

I am trying to edit my events model. Here is what I have for the edit:

Edit Event

<%= form_for(@event) do |f| %>
    <%= render 'fields', :f => f %>
    <div class="actions">
        <%= f.label :name %><br />
        <%= f.text_field :name %>
        <%= f.label :description %><br />
        <%= f.text_field :description %>
        <%= f.submit "Update" %>
    </div>
<% end %>

I made the route as so:

  resources :events do
    member do
      post :attend
      post "/remove_attendee/:user_id" => "events#remove_attendee", :as=>:remove_attendee
      post "/edit" => "events#edit"
    end

But I am getting a no method error. NoMethodError in Events#edit and it is on line 3 which is the form_for place. What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T05:27:31+00:00Added an answer on May 23, 2026 at 5:27 am

    The error is not in your view, the form_for tag calls some methods on the resource passed in, in this case @event. Make sure that @event is not nil and that the lookup to pull up the resource is working as intended. Again, seeing you controller/model/etc. code along with the full error would help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a event model that has many invitations. Invitations are setup through checkboxes
I'm trying to obvserve the adminhtml_block_salesrule_actions_prepareform event thats dispatched in the app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php file in
Basically, I have an Events model and an EventSets model. Events have EventSets (where
I am trying to build a ListBox with items that have edit states. I
When trying Edit Table Data in MySQL Workbench 5.2.37, its in read only mode.
I'm trying to edit the httpd.conf file located in /private/etc/apache2, and I can't figure
I'm trying to edit this submit tag to make it disable itself once I
I'm trying to edit a form with a ImageField and I´m using modelformset_factory in
I am trying to edit the sidebar of a mediawiki page by making a
I am trying to edit grid data and save it to the grid itself

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.