Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal-rails
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 39461c5755a5
Choose a base ref
...
head repository: opal/opal-rails
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5a0c0aaf10f0
Choose a head ref
  • 3 commits
  • 1 file changed
  • 2 contributors

Commits on Dec 31, 2014

  1. fix NameError for rails < 4.2.0

    `::Rails::Generators::ModelHelpers` exists since rails 4.2.0.
    In prior versions `::Rails::Generators::ResourceHelpers` handles the
    warn message.
    
    this fixes #29
    cantonic committed Dec 31, 2014
    Copy the full SHA
    0e30d55 View commit details
  2. refactor expression

    cantonic committed Dec 31, 2014
    Copy the full SHA
    783d0f7 View commit details
  3. Merge pull request #30 from cantonic/master

    Fix NameError in generator for Rails < 4.2
    elia committed Dec 31, 2014
    Copy the full SHA
    5a0c0aa View commit details
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/rails/generators/opal/assets/assets_generator.rb
4 changes: 3 additions & 1 deletion lib/rails/generators/opal/assets/assets_generator.rb
Original file line number Diff line number Diff line change
@@ -8,7 +8,9 @@ class AssetsGenerator < ::Rails::Generators::NamedBase
source_root __dir__+'/templates'

def initialize(*args)
::Rails::Generators::ModelHelpers.skip_warn = true

module_name = ::Rails::Generators.const_defined?('ModelHelpers') ? 'ModelHelpers' : 'ResourceHelpers'
::Rails::Generators.const_get(module_name).skip_warn = true
super
end