Here I continue on Refinery and show how to add database-backed content by generating an engine. You will also learn how to override Refinery's views and controllers in this episode.
Any idea on how to have the pianos available to other pages, specifically the home page? The examples on the Refinery site for their engines are a little hard to follow.
Rails 3.2 migration conventions work, as well. String is default
rails g refinery:engine piano name dimensions manufactured_on:date upright:boolean photo:image description:text
I don't think it's as much of a convention as it is a convenience. There's no harm in appending :string when running the generator.
Joe please post here if the bug Ryan mentioned has been fixed, im about to try Refinary , im just waiting for that fix.
The page parts bug is fixed in 2.0.2. Which bug are you asking about?
and project started!!!!
The one ryan mentioned
It is all fine until you try to integrate it as a part of existing app. I'm working on it at the moment for a while.
woaaa you made a very good screencast, thanks ;)
In your face PHP developers!!! :D
Great cast ryan. Any plans on BrowserCMS?
There is a nice (somewhat oudated) comparsion here
Nice one!
Has someone tried to render refinerycms views throughout backbone.js like Ryan showed for "normal" Rails apps a few episodes before?
Is there documentation on the engine generator? I was trying to lookup how I could specify a field type for uploading files instead of photos.
nm... I should look around better
http://refinerycms.com/guides/multiple-resources-in-an-extension
Has anyone else run into a mass assignment error when trying to create a new piano?
ActiveModel::MassAssignmentSecurity::Error in Refinery::Pianos::Admin::PianosController#create
Can't mass-assign protected attributes: name, dimensions, manufactured_on(1i), manufactured_on(2i), manufactured_on(3i), upright, photo_id, description, position
Here's screenshot of error:
http://grab.by/cWGE
If anyone has an idea how to solve this, would be appreciated.
Brett, i fixed that by adding next line in pianos.rb file
This works perfectly.
Thanks heaps!
Any idea on how to have the pianos available to other pages, specifically the home page? The examples on the Refinery site for their engines are a little hard to follow.
The best way to do it is to use a decorator as Ryan has done with the authenticate method. To wit:
There is a typo in the show notes, it's missing the underscore:
rake refinery:override view=refinery/_headI've corrected the show notes, thanks for letting us know!
Pretty new to Refinery world. Any clue on how to turn on multilanguage engines support to Refinery? Locales yml files are correctly generated. Thanks.
First sign in through GitHub to post a comment.