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
| [{"id":41,"photo_id":11,"title":"again","image_gallery_url":"/system/images/11/gallery/1_5.jpg?1315879466","image_large_url":"/system/images/11/large/1_5.jpg?1315879466","image_original_url":"/system/images/11/original/1_5.jpg?1315879466"},{"id":42,"photo_id":8,"title":"Greyscale 2","image_gallery_url":"/system/images/8/gallery/1_2.jpg?1315879465","image_large_url":"/system/images/8/large/1_2.jpg?1315879465","image_original_url":"/system/images/8/original/1_2.jpg?1315879465"}] |
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 'spec_helper' | |
| describe Admin::UsersController do | |
| describe "GET index" do | |
| context "while not signed-in" do | |
| it "should redirect to the sign-in page" do | |
| get :index | |
| response.should redirect_to(new_admin_session_url) |
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 'spec_helper' | |
| describe "change my password" do | |
| before(:each) do | |
| @user = Factory(:user) | |
| i_sign_in(@user) | |
| visit edit_user_registration_path | |
| end | |
| it "should require my current password" do |
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 i_sign_in(user, password='secret') | |
| if user.is_a?(User) | |
| visit new_user_session_path | |
| within('#user_new') do | |
| fill_in('Email', :with => user.email) | |
| fill_in('Password', :with => password) | |
| click_button('Sign in') | |
| end | |
| elsif user.is_a?(Admin) | |
| visit new_admin_session_path |
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
| angular.service 'DailyCount', ($resource) -> | |
| $resource '/analytics/doc_totals/:doc_id?tz_offset=:tz_offset&start_date=:start_date&end_date=:end_date', {}, { 'get': { method: 'GET', isArray: false }} | |
| angular.service 'OpenEvents', ($resource) -> | |
| $resource '/analytics/docs/:doc_id?tz_offset=:tz_offset&event=open&start_date=:start_date&end_date=:end_date', {}, { 'index': { method: 'GET', isArray: true }} | |
| angular.service 'SessionEvents', ($resource) -> | |
| $resource '/analytics/docs/:doc_id?session_id=:session_id', {}, { 'index': { method: 'GET', isArray: true }} |
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
| window.angular = {} unless window.angular | |
| angular.module = {} unless angular.module | |
| angular.module.DataStreams = ($provide, $locationProvider) -> | |
| $provide.service 'DailyCount', ($resource) -> | |
| $resource '/analytics/doc_totals/:doc_id?tz_offset=:tz_offset&start_date=:start_date&end_date=:end_date', {}, { 'get': { method: 'GET', isArray: false }} | |
| $provide.service 'OpenEvents', ($resource) -> | |
| $resource '/analytics/docs/:doc_id?tz_offset=:tz_offset&event=open&start_date=:start_date&end_date=:end_date', {}, { 'index': { method: 'GET', isArray: true }} |
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
| (function() { | |
| window.angular.module.DataStreams = [ | |
| window.$provide, window.$resource, function($provide, $resource) { | |
| $provide.service('DailyCount', function($resource) { | |
| return $resource('/analytics/doc_totals/:doc_id?tz_offset=:tz_offset&start_date=:start_date&end_date=:end_date', {}, { | |
| 'get': { | |
| method: 'GET', | |
| isArray: false | |
| } |
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
| (function() { | |
| window.angular.module.ResourcesModule = [ | |
| '$provide', '$resource', function($provide, $resource) { | |
| $provide.factory('DailyCount', function($resource) { | |
| return $resource('/analytics/doc_totals/:doc_id?tz_offset=:tz_offset&start_date=:start_date&end_date=:end_date', {}, { | |
| 'get': { | |
| method: 'GET', | |
| isArray: false | |
| } |
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
| (function() { | |
| window.angular.module.ResourcesModule = [ | |
| '$provide', '$resource', function($provide, $resource) { | |
| $provide.value('DailyCount', $resource('/analytics/pop_totals/:pop_id?tz_offset=:tz_offset&start_date=:start_date&end_date=:end_date', {}, { | |
| 'get': { | |
| method: 'GET', | |
| isArray: false | |
| } | |
| })); | |
| $provide.value('OpenEvents', $resource('/analytics/pops/:pop_id?tz_offset=:tz_offset&event=open&start_date=:start_date&end_date=:end_date', {}, { |
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
| <% unless notice.blank? %> | |
| <div class="alert-message warning"> | |
| <a href="#" class="close">x</a> | |
| <p><%= notice %></p> | |
| </div> | |
| <% end %> | |
| <% unless alert.blank? %> | |
| <div class="alert-message error"> |