| layout | post |
|---|---|
| title | Test Post |
| date | 2013-04-26 22:12 |
| comments | true |
| categories |
Testing code blocks:
| # GET /products/new | |
| def new | |
| @product = current_user.products.build | |
| #binding.pry | |
| @product.product_countries.build | |
| @product.people.build | |
| end |
| class Product < ActiveRecord::Base | |
| include ActionView::Helpers | |
| MASS_ASSIGNABLE_ATTRIBUTES = [:authority, :category_id, :category_ids, :country_id, :description, :duration, | |
| :long_description, :name, :people_attributes, :permission, :poster, :poster_cache, :product_countries_attributes, | |
| :product_id, :product_people_attributes, :region_ids, :user_attributes, :year_of_completion, :terms_and_conditions] | |
| attr_accessible *MASS_ASSIGNABLE_ATTRIBUTES | |
| attr_accessible *MASS_ASSIGNABLE_ATTRIBUTES, as: :admin | |
| attr_accessible :assets_attributes, :cash_value, :product_type, :recommended, :status, :tags_autocomplete, :user_id, | |
| as: :admin |
| %h1 Archive for | |
| -case page_type | |
| -when 'day' | |
| ~ Date.new(year, month, day).strftime('%b %e %Y') | |
| -when 'month' | |
| ~ Date.new(year, month, 1).strftime('%b %Y') | |
| -when 'year' | |
| ~ year |
| --- | |
| layout: post | |
| title: "Test Post" | |
| date: 2013-04-26 22:12 | |
| comments: true | |
| categories: | |
| --- | |
| Testing code blocks: |
| layout | post |
|---|---|
| title | Test Post |
| date | 2013-04-26 22:12 |
| comments | true |
| categories |
Testing code blocks:
| - (void) postLogin | |
| { | |
| //Setup Login data | |
| UserLogin *l = [[UserLogin alloc] initWithUsername:[usernameField text] andPassword:[passwordField text]]; | |
| //Setup Routes | |
| RKObjectRouter *router = [RKObjectManager sharedManager].router; | |
| [router routeClass:[UserLogin class] toResourcePath:@"/api/v1/login" forMethod:RKRequestMethodPOST]; | |
| # app/controllers/api/v1/base_controller.rb | |
| class Api::V1::BaseController < ApplicationController | |
| skip_before_filter :verify_authenticity_token | |
| include Api::V1::SessionsHelper | |
| respond_to :json | |
| before_filter :authenticate_user |
| What is this?? L |