GithubHelp home page GithubHelp logo

Comments (4)

EnriqueVidal avatar EnriqueVidal commented on June 6, 2024

Here is my post.rb file:

class Post < ActiveRecord::Base
has_many :comments
belongs_to :user

validates_presence_of :title, :body

attr_accessible :title, :body, :timestamp

cattr_reader :per_page
@@per_page = 5

named_scope :latest, :order => 'created_at DESC', :limit => 20

papermill :thumbnail => {:width => 100, :height => 75} # catch-all for non-specified associations, will create assets/asset methods.
papermill :image_gallery, :class_name => ImageAsset, :images_only => true, :thumbnail => {:width => 75, :height => 100}

image_gallery association (set with define_method)

end

from papermill.

EnriqueVidal avatar EnriqueVidal commented on June 6, 2024

this is my form code:

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

<%= f.label :title %>
<%= f.text_field :title %>

<br />

<%= f.label :body %>
<br / >
<%= f.text_area    :body, :cols => 75, :rows => 35, :class => "mceEditor" %>

<br /><br />

<%= f.label :image_gallery %><br />
<%= f.images_upload(:image_gallery) %><br /><br />

<%= f.label :post_image %><br />
<%= f.image_upload(:post_image) %><br /><br />

<%= f.submit 'Submit' %>

<% end %>

from papermill.

bbenezech avatar bbenezech commented on June 6, 2024

Hello,

I just tried, I found no problem with your code.
The only thing I can think of is your @post is an instance of Array (???) when it should be an ActiveRecord::Base object.
Please check your @post object.

You also obviously have a routing problem (the "Couldn't find Post with ID=edit" part)

Weird. Have you found a solution meanwhile?

from papermill.

bbenezech avatar bbenezech commented on June 6, 2024

Closed

from papermill.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.