Multi resources in an extension not generating properly, what version of Refinery should I be using ?

37 views
Skip to first unread message

Franz@MadWagon

unread,
Oct 4, 2012, 5:53:32 AM10/4/12
to Refinery CMS
Hello,

What version of Refinery should I use in order to successfully
generate a multi resources extension (various problems with version
2.0.8 prevents me from doing it) ?

Also what would be the correct syntax to use ? I have an extension
Departments and I need another extension Formations inside of it. I am
confused whether I should write :

"rails generate refinery:departments formations" as it says in the
guide

or just

"rails generate refinery:departments" ? (as it prompts)

Also, after I generated the Formations extension, the Department menu
has been removed from the backend menu for whatever reason, I don't
know how to put it back.

(I also ran into the migrations having the same number problem which
is already referenced in the issue list.)

Thanks
Franz



Martin Markech

unread,
Oct 4, 2012, 6:42:58 AM10/4/12
to refine...@googlegroups.com
Hi

I had similar problems. You need to create Department extension with 2 models -  department and formation under one menu in backend, am I right? Similar like blog engine - with submenu under search box? 

See this https://github.com/refinery/refinerycms/pull/1951 . Generator for multi resourse is now broken, so how to get it to work (extension events, model event and place, like in  guides):

1) rails generate refinery:engine event title:string date:datetime photo:image blurb:text
 - we create resource event

2) rails generate refinery:engine place name:string --extension events --namespace events
- we create resource place under events extension

There is little bug, under lib folder it creates two engine.rb instead of one. 

vendor/extensions/events/lib/refinery/places/engine.rb
vendor/extensions/events/lib/refinery/places.rb

So delete that ^^ files and all load paths in files in lib folder to that files and run:
rails generate refinery:events

It should work. Submenu you have to create on your own. Replace with your extension/model names. This hack I do on 2.0.8 and on edge








Franz@MadWagon

unread,
Oct 4, 2012, 6:50:45 AM10/4/12
to Refinery CMS
Thank you.

No, I don't need the Formation menu under the Department menu, I can
have 2 separate menus side by side, it's just that Formation extension
has removed Department from the backend

Do you know from which Refinery version this is broken ? I did a
project with 2.0.3 (I think) and it was working fine. I would like to
just redo the same, but may be not going back as far as 2.0.3.

Thanks
Franz

On Oct 4, 5:42 pm, Martin Markech <matomark...@gmail.com> wrote:
> Hi
>
> I had similar problems. You need to create Department extension with 2
> models -  department and formation under one menu in backend, am I right?
> Similar like blog engine - with submenu under search box?
>
> See thishttps://github.com/refinery/refinerycms/pull/1951. Generator for
Reply all
Reply to author
Forward
0 new messages