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
| app = angular.module('app', [ | |
| 'ngRoute', | |
| 'pascalprecht.translate' | |
| ]); | |
| app.config(['$translateProvider', function($translateProvider) { | |
| $translateProvider.useStaticFilesLoader({ | |
| prefix: 'locales/', | |
| suffix: '.json' | |
| }); |
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
| <h1 translate>pages.home.heading</h1> |
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
| en: | |
| pages: | |
| home: | |
| heading: 'Hello, world!' |
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 |
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
| <!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
| 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
| 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
| 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 | |
| module Api | |
| class ApplicationController < Crowdster.config.base_controller.constantize | |
| end | |
| end | |
| end |