This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Crowdster | |
| module Models | |
| module Campaigner | |
| def included(klass) | |
| klass.class_eval do | |
| has_many :campaigns, class_name: 'Crowdster::Campaign' | |
| end | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Crowdster | |
| module ActsAsCampaigner | |
| def included(klass) | |
| klass.extend ClassMethods | |
| end | |
| module ClassMethods | |
| def acts_as_campaigner | |
| has_many :campaigns, class_name: 'Crowdster::Campaign' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Crowdster | |
| class Engine < ::Rails::Engine | |
| isolate_namespace Crowdster | |
| config.to_prepare do | |
| if Crowdster.config | |
| Crowdster.config.user_class.constantize.class_eval do | |
| has_many :campaigns, class_name: 'Crowdster::Campaign' | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Crowdster | |
| module Api | |
| class ApplicationController < Crowdster.config.base_controller.constantize | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Crowdster | |
| class << self | |
| attr_reader :config | |
| def configure | |
| @config = Configuration.new | |
| yield config | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Crowdster | |
| class Configuration | |
| attr_accessor :setting1, :setting2 | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MyEngine.configure do |config| | |
| # Description of the setting here... | |
| config.setting1 = :value | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="it"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Immagini</title> | |
| <style> | |
| .container { | |
| max-width: 500px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var myApp = angular.module('myApp'); | |
| myApp.directive('selectPicker', function() { | |
| return { | |
| restrict: 'A', | |
| link: function(scope, element, attrs) { | |
| $(element).selectpicker(); | |
| $(element).change(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rails_helper' | |
| RSpec.feature 'The home page' do | |
| scenario 'Visiting the home' do | |
| visit '/' | |
| expect(page).to have_content I18n.t('pages.home.heading') | |
| end | |
| end |