Questions tagged [rails-engines]

A Rails engine allows you to share common functionality across applications in the form of a gem or a plugin. Engines can be considered miniature applications that provide functionality to their host applications.

A Rails engine allows you to share common functionality across applications in the form of a gem or a plugin. Engines can be considered miniature applications that provide functionality to their host applications.

Check http://guides.rubyonrails.org/engines.html and http://railscasts.com/episodes/277-mountable-engines for more details.

776 questions
0
votes
1 answer

Determine given module is rails engine

Hi I have two modules Admin Blog (Blog is a rails engine) where Admin is a module for namespacing admin features of app, but Blog is a module representing rails engine. Is there a better way to determine which among them is engine, like a function…
Paritosh Singh
  • 6,288
  • 5
  • 37
  • 56
0
votes
0 answers

How to override model in my app?

i m using engine ... i want to override a user model from engine to my app... please tell me how to do Model in my local app looks like below require_dependency EngineName::Engine.root.join('app','models','Model name').to_s module EngineName …
0
votes
1 answer

Proper way to specify the Rails::Engine for dependency gems?

I'm building a namespaced Rails Engine gem which will be extendable through additional gems. For example: MyEngine is the main gem which will also be the namespace. MyEngine-blog & MyEngine-support are optional gems to extend the MyEngine gem while…
AJ.
  • 1,248
  • 10
  • 27
0
votes
1 answer

Rails mountable engine assets in production mode

I built a mountable rails engine in rails 4. I used the engine in another app. In development mode everything runs fine, I can reach the engine without any troubles and all engine assets are displayed properly. But when I deployed the host app to my…
0
votes
1 answer

Omniauth-Facebook callback does not get initialised in Rails Mountable Engine

I'm developing a mountable engine (called SimpleUser) which uses Devise, OmniAuth and OmniAuth-Facebook. First I made a test app with the gems about and every worked fine. Next, I started building the engine from scratch, using the code of the test…
pablomarti
  • 2,087
  • 2
  • 22
  • 35
0
votes
1 answer

Override refinerycms pages extension from another extension

I'm making redirecting extension and I'd like to make a decorator for find_page in PagesController in pages extension (to handle redirect if page is not found). Everything works fine if the decorator is in main app. If I put it in my redirect…
Slobodan Kovacevic
  • 6,848
  • 3
  • 29
  • 33
0
votes
1 answer

Error running tests for a rails engine

I'm building an application based on the social-stream gem, which is a Rails engine. I have a Rakefile. I've included the factory-girl gem in my Gemfile, but for some reason the rake tasks are failing on that class. There are a lot of tests in the…
port5432
  • 5,889
  • 10
  • 60
  • 97
0
votes
1 answer

RoR engines using JRuby - failed initial migration, bad

First time I try to set up rails mountable engine in project based on JRuby (necessary). Engine is empty only with one 'hello world' testing controller+view, without any model, no use of JSON. I tried run 'bundle install' and it passed well without…
0
votes
1 answer

Removing Rails Engine's Routes

I've read Overriding named routes provided by Rails 3 Engines and solicited some fresh answers, but all of the solutions feel pretty gross if you're goal is to remove routes in bulk. Prepending routes to override the engine's routes was effective;…
rthbound
  • 1,323
  • 1
  • 17
  • 24
0
votes
1 answer

How can I contribute to an existing rails gem/engine

What is the best way to extent and contribute to a rails gem/engine I have found this blog gem/engine , which I want to use it in my rails3 application. But there are few modifications / features I would like to have and I'm willing do code them.…
sameera207
  • 16,547
  • 19
  • 87
  • 152
0
votes
1 answer

Controller can't see def new/create for rails 3.2.8 engine

We are testing a customerx engine under spec/dummy. Index page of the engine customerx can be displayed without any error. Here is the link:
  • <%= link_to 'Customers', customerx.customer_status_categories_path %>
  • However there is routing…
    user938363
    • 9,990
    • 38
    • 137
    • 303
    0
    votes
    1 answer

    route helpers not found after overriding engine view

    whenever I override an engine's view, I get method missing on all the route helpers in the views and also in the helpers from the engine used in the view. How can I make the view to look for the helpers in the engine and not the ones in my…
    ryudice
    • 36,476
    • 32
    • 115
    • 163
    0
    votes
    1 answer

    Rails engine asset available to app when `path` used, but not if downloaded from rubygems.org

    I find this problem a little funky, and need more sets of eyes. I'm making a super simple gem that makes the backbone.eventbinder.js file available to the Rails app that requires this gem. The problem is that when I add gem…
    Ramon Tayag
    • 15,224
    • 9
    • 43
    • 69
    0
    votes
    1 answer

    Delegate class in main app to class in rails engine

    I have an isolated Rails Engine: Admin. In that Engine I create Sites through a GUI. in Engine: module Admin class Site < ActiveRecord::Base end end In main app I inherit from the engine's Site in order to use it as a constant at the root…
    Yeggeps
    • 2,055
    • 2
    • 25
    • 34
    0
    votes
    1 answer

    Appending a constant Array in the main app from a Rails engine

    yes, I want to append a CONSTANT, I have an array that is stored as a constant in the mainapp, something like class FOO ABILITY = [["xxxx","XX"],["yy","YYY"]] end above constant is used throughout the mainapp in various ways. now, I have a rails…
    Saifis
    • 2,197
    • 1
    • 22
    • 36