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
| gem 'factory_girl' | |
| spec_helper.rb: | |
| .... | |
| FactoryGirl.find_definitions |
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
| ... | |
| it "should show another channels" do | |
| channels = FactoryGirl.build_list(:channels) | |
| channels_view = app.view('channels') | |
| channels_view.show_another_channels(channels) | |
| 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
| FactoryGirl.define do | |
| factory :channel do | |
| name | |
| 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
| git branch develop | |
| git flow feature start 00001_my_super_feature | |
| git co staging | |
| git merge feature/00001_my_super_feature | |
| bundle exec rake | |
| git push | |
| git flow feature finish 00001_my_super_feature |
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
| def fill_view(models, active_index) | |
| if models.count > 0 | |
| @broadcast.truncate | |
| @items = models | |
| @current_item_index = active_index | |
| @current_item = models[active_index] | |
| if models[0].is_a?(Channel) | |
| @channel_info_area_logo.props.url = @current_item.small_logo | |
| @channel_info_area_text.props.text = @current_item.name | |
| hide_episode_description |
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
| def index | |
| @people = People.all | |
| respond_to do |format| | |
| format.html | |
| format.xml { render xml: @people.to_xml } | |
| 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
| json.meta do |json| | |
| json.total @lists.total_count | |
| json.num_pages @lists.num_pages | |
| json.per_page @per_page | |
| end | |
| json.items @lists do |json, list| | |
| json.partial! "maillist", maillist: list | |
| 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
| { | |
| "$schema": "http://json-schema.org/draft-04/schema#", | |
| "title": "Product", | |
| "description": "List object", | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "description": "The unique identifier for a product", | |
| "type": "integer" | |
| }, |
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
| config.exceptions_app = self.routes |
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
| match '/404', :to => "errors#not_found" | |
| match '/500', :to => "errors#internal_error" | |
| match '/422', :to => "errors#unprocessable_entity" |