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

Showing 1-3 of 3 messages
Multi resources in an extension not generating properly, what version of Refinery should I be using ? Franz@MadWagon 10/4/12 2:53 AM
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



Re: Multi resources in an extension not generating properly, what version of Refinery should I be using ? Martin Markech 10/4/12 3:42 AM
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








Re: Multi resources in an extension not generating properly, what version of Refinery should I be using ? Franz@MadWagon 10/4/12 3:50 AM
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