Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helper method in rails failed #26

Closed
ghost opened this issue Mar 31, 2011 · 1 comment
Closed

helper method in rails failed #26

ghost opened this issue Mar 31, 2011 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 31, 2011

Model

class Post < Ohm::Model
attribute :title
attribute :content
attribute :tags
include Ohm::ActiveModelExtension
include Ohm::Timestamping
...
End

In controller

GET /posts/new

GET /posts/new.xml

def new
@post = Post.new
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @post }
end
end

In view, just use the generated one.

<%= form_for(@post) do |f| %>
....

<%= f.text_field :title %> or
<%#= text_field(:post, :title, :size => 20) %>

Error message
undefined method `title' for #Ohm::ActiveModelInterface:0xb6ad8c0

I did not found any other has such error in Google or here.
I can not found out what's the problem caused the title not found.

@cyx
Copy link
Collaborator

cyx commented Mar 23, 2012

Hi ghost,

Unfortunately we don't use ohm with rails at all (and never plan to).

I'm sorry for the trouble.

@cyx cyx closed this as completed Mar 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant