We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Model
class Post < Ohm::Model attribute :title attribute :content attribute :tags include Ohm::ActiveModelExtension include Ohm::Timestamping ... End
In controller
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.
The text was updated successfully, but these errors were encountered:
Hi ghost,
Unfortunately we don't use ohm with rails at all (and never plan to).
I'm sorry for the trouble.
Sorry, something went wrong.
No branches or pull requests
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.
The text was updated successfully, but these errors were encountered: